Class: Doorkeeper::SecretStoring::Plain
- Defined in:
- lib/doorkeeper/secret_storing/plain.rb
Overview
Plain text secret storing, which is the default but also provides fallback lookup if other secret storing mechanisms are enabled.
Class Method Summary collapse
-
.allows_restoring_secrets? ⇒ Boolean
Plain values obviously allow restoring.
-
.restore_secret(resource, attribute) ⇒ Object
Return the restored value from the database as retrieved from the database.
-
.transform_secret(plain_secret) ⇒ Object
Return the value to be stored by the database.
Methods inherited from Base
secret_matches?, store_secret, validate_for
Class Method Details
.allows_restoring_secrets? ⇒ Boolean
Plain values obviously allow restoring
28 29 30 |
# File 'lib/doorkeeper/secret_storing/plain.rb', line 28 def self.allows_restoring_secrets? true end |
.restore_secret(resource, attribute) ⇒ Object
Return the restored value from the database as retrieved from the database.
22 23 24 |
# File 'lib/doorkeeper/secret_storing/plain.rb', line 22 def self.restore_secret(resource, attribute) resource.public_send(attribute) end |
.transform_secret(plain_secret) ⇒ Object
Return the value to be stored by the database
13 14 15 |
# File 'lib/doorkeeper/secret_storing/plain.rb', line 13 def self.transform_secret(plain_secret) plain_secret end |