Method: Doorkeeper::Config::Builder#hash_token_secrets

Defined in:
lib/doorkeeper/config.rb

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

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

Parameters:

  • using (defaults to: nil)

    Provide a different secret storage implementation class for tokens

  • fallback (defaults to: nil)

    Provide a fallback secret storage implementation class for tokens or use :plain to fallback to plain tokens



165
166
167
168
169
170
# File 'lib/doorkeeper/config.rb', line 165

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