Module: Simple::OAuth2::UniqToken

Defined in:
lib/simple_oauth2/uniq_token.rb

Overview

OAuth2 helper for generation of unique token values. Can process custom payload and options

Class Method Summary collapse

Class Method Details

.generate(_payload = {}, options = {}) ⇒ String

Generates unique token value


15
16
17
# File 'lib/simple_oauth2/uniq_token.rb', line 15

def self.generate(_payload = {}, options = {})
  SecureRandom.hex(options.delete(:size) || 32)
end