engines/adva_user/lib/action_controller/authenticate_user.rb
def validate_token(klass, token, options = {})
          return nil if token.blank?
          return nil unless token =~ /\;/

          uid, token = token.split ';'
          if object = klass.find_by_id(uid) # , authentication_find_options[klass] || {}
            return object if object.authenticate(token)
          end
          nil
        end
# The tokens are stored in various places as id;token. This method
# will split that out and validate it. If everything is successful
# then the user object is returned. Otherwise nil is returned.
# The full token should be passed in.
The tokens are stored in various places as id;token. This method
will split that out and validate it. If everything is successful
then the user object is returned. Otherwise nil is returned.
The full token should be passed in.
The tokens are stored in various places as id ; token . This method will split that out and validate it . If everything is successful then the user object is returned . Otherwise nil is returned . The full token should be passed in .
def validate_token(klass, token, options = {})
          return nil if token.blank?
          return nil unless token =~ /\;/
          uid, token = token.split ';'
          if object = klass.find_by_id(uid) 
            return object if object.authenticate(token)
          end
          nil
        end
def validate_token ( klass , token , options = { } ) return nil if token . blank? return nil unless token =~ / \; / uid , token = token . split ';' if object = klass . find_by_id ( uid ) return object if object . authenticate ( token ) end nil end
The tokens are stored in various places as id;token.
The tokens are stored in various places as id ; token .
# , authentication_find_options[klass] || {}
klass
token
options