class Doorkeeper::SecretStoring::Plain

Plain text secret storing, which is the default but also provides fallback lookup if other secret storing mechanisms are enabled.

Public Class Methods

allows_restoring_secrets?() click to toggle source

Plain values obviously allow restoring

# File lib/doorkeeper/secret_storing/plain.rb, line 28
def self.allows_restoring_secrets?
  true
end
restore_secret(resource, attribute) click to toggle source

Return the restored value from the database @param resource The resource instance to act on @param attribute The secret attribute to restore as retrieved from the database.

# File lib/doorkeeper/secret_storing/plain.rb, line 22
def self.restore_secret(resource, attribute)
  resource.public_send(attribute)
end
transform_secret(plain_secret) click to toggle source

Return the value to be stored by the database @param plain_secret The plain secret input / generated

# File lib/doorkeeper/secret_storing/plain.rb, line 13
def self.transform_secret(plain_secret)
  plain_secret
end