module Doorkeeper::OAuth::Helpers::UniqueToken
def self.default_generator_method
Generator method for default generator class (SecureRandom)
def self.default_generator_method Doorkeeper.config.default_generator_method end
def self.generate(options = {})
def self.generate(options = {}) # Access Token value must be 1*VSCHAR or # 1*( ALPHA / DIGIT / "-" / "." / "_" / "~" / "+" / "/" ) *"=" # # @see https://datatracker.ietf.org/doc/html/rfc6749#appendix-A.12 # @see https://datatracker.ietf.org/doc/html/rfc6750#section-2.1 # generator = options.delete(:generator) || SecureRandom.method(default_generator_method) token_size = options.delete(:size) || 32 generator.call(token_size) end