Principal
interface Principal
Contract the auth guard/provider relies on to authenticate a model without knowing its underlying schema. A Principal exposes its identifier, its stored password, and its remember-me token through a fixed set of accessors, along with the column names backing each, so the authentication system can operate against any model that maps these concepts to storage however it chooses.
Methods
Gets the name of the column that uniquely identifies the principal.
Gets the principal's unique identifier value.
Gets the name of the column that stores the principal's password, or null if the model has no password column.
Gets the principal's stored (hashed) password.
Gets the principal's current remember-me token.
Sets the principal's remember-me token. Implementations for models that do not support remember-me may treat this as a no-op.
Gets the name of the column that stores the remember-me token, or null if the model does not support remember-me.
Details
at line 19
string
getAuthIdentifierName()
Gets the name of the column that uniquely identifies the principal.
at line 26
mixed
getAuthIdentifier()
Gets the principal's unique identifier value.
at line 34
string|null
getAuthPasswordName()
Gets the name of the column that stores the principal's password, or null if the model has no password column.
at line 41
string|null
getAuthPassword()
Gets the principal's stored (hashed) password.
at line 49
string|null
getRememberToken()
Gets the principal's current remember-me token.
at line 58
void
setRememberToken(string $value)
Sets the principal's remember-me token. Implementations for models that do not support remember-me may treat this as a no-op.
at line 67
string|null
getRememberTokenName()
Gets the name of the column that stores the remember-me token, or null if the model does not support remember-me.