- PRIVATE METHODS
RT::AuthToken - Represents an authentication token for a user
Create takes a hash of values and creates a row in the database. Available keys are:
The user ID for whom this token will authenticate. If it's not the AuthToken object's CurrentUser, then the AdminUsers permission is required.
A human-readable description of what this token will be used for.
Returns a tuple of (status, msg) on failure and (id, msg, authstring) on success. Note that this is the only time the authstring will be directly readable (as it is stored in the database hashed like a password, so use this opportunity to capture it.
Returns true if the current user can see the AuthToken
Sets the "last used" time, without touching "last updated"
Class method that takes as input an authstring and provides a tuple of (user id, token) on success, or the empty list on failure.
Analogous to "IsPassword" in RT::User, without all of the legacy password forms.
Documented for internal use only, do not call these from outside RT::AuthToken itself.
Checks if the current user can ManageAuthTokens before calling
Checks "CurrentUserCanSee" before calling
Generates an unpredictable auth token
Takes a user id and token and provides an authstring for use in place of a (username, password) combo.← Back to index