engines/adva_user/vendor/plugins/authentication/lib/authentication/single_token.rb
def assign_token(user, name, expire)
      return nil unless valid_model? user

      user.token_expiration = expire
      token = hash_string "token-#{Time.zone.now}"
      user.token_key = hash_string token
      token
    end
# Will create a new token for the given user with the given expiration
Will create a new token for the given user with the given expiration
Will create a new token for the given user with the given expiration
def assign_token(user, name, expire)
      return nil unless valid_model? user
      user.token_expiration = expire
      token = hash_string "token-#{Time.zone.now}"
      user.token_key = hash_string token
      token
    end
def assign_token ( user , name , expire ) return nil unless valid_model? user user . token_expiration = expire token = hash_string "token-#{Time.zone.now}" user . token_key = hash_string token token end
Will create a new token for the given user with the given expiration
Will create a new token for the given user with the given expiration
user
name
expire