Module: Sorcery::Model::TemporaryToken

Defined in:
lib/sorcery/model/temporary_token.rb

Overview

This module encapsulates the logic for temporary token. A temporary token is created to identify a user in scenarios such as reseting password and activating the user by email.

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Class Method Details

.generate_random_tokenObject

Random code, used for salt and temporary tokens.



14
15
16
# File 'lib/sorcery/model/temporary_token.rb', line 14

def self.generate_random_token
  SecureRandom.base64(15).tr('+/=lIO0', 'pqrsxyz')
end

.included(base) ⇒ Object



9
10
11
# File 'lib/sorcery/model/temporary_token.rb', line 9

def self.included(base)
  base.extend(ClassMethods)
end