Module: Doorkeeper::OAuth::Helpers::UniqueToken

Defined in:
lib/doorkeeper/oauth/helpers/unique_token.rb

Class Method Summary collapse

Class Method Details

.generate(options = {}) ⇒ Object


5
6
7
8
9
# File 'lib/doorkeeper/oauth/helpers/unique_token.rb', line 5

def self.generate(options = {})
  generator_method = options.delete(:generator) || SecureRandom.method(:hex)
  token_size       = options.delete(:size)      || 32
  generator_method.call(token_size)
end