Method: Doorkeeper::Config::Builder#hash_application_secrets

Defined in:
lib/doorkeeper/config.rb

#hash_application_secrets(using: nil, fallback: nil) ⇒ Object

Allow optional hashing of application secrets before persisting them. Will be used for hashing of input token and grants.

Parameters:

  • using (defaults to: nil)

    Provide a different secret storage implementation for applications

  • fallback (defaults to: nil)

    Provide a fallback secret storage implementation for applications or use :plain to fallback to plain application secrets



180
181
182
183
184
185
# File 'lib/doorkeeper/config.rb', line 180

def hash_application_secrets(using: nil, fallback: nil)
  default = "::Doorkeeper::SecretStoring::Sha256Hash"
  configure_secrets_for :application,
                        using: using || default,
                        fallback: fallback
end