AuthResult
Piwik\
AuthResult
Authentication result.
Methods
The class defines the following methods:
__construct()— Constructor for AuthResultgetIdentity()— Returns the login used to authenticate.getTokenAuth()— Returns the token_auth to authenticate the current user in the APIgetCode()— Returns the authentication result code.hasSuperUserAccess()— Returns true if the user has Super User access, false otherwise.wasAuthenticationSuccessful()— Returns true if this result was successfully authentication.getAuthContext()— Returns optional context payload set during authentication.
__construct()
Constructor for AuthResult
Signature
It accepts the following parameter(s):
$code(int) —$login(string) — identity$tokenAuth(string) —$authContext(array|null) — Optional context the Auth implementation wants to pass on. Declaringtoken_access_level-nullincluded, meaning "no scope" - states the token scope and stops core looking it up on the token row, so leave the key out unless the implementation knows the scope itself.
getIdentity()
Returns the login used to authenticate.
Signature
- It returns a
stringvalue.
getTokenAuth()
Returns the token_auth to authenticate the current user in the API
Signature
- It returns a
stringvalue.
getCode()
Returns the authentication result code.
Signature
- It returns a
intvalue.
hasSuperUserAccess()
Returns true if the user has Super User access, false otherwise.
Signature
- It returns a
boolvalue.
wasAuthenticationSuccessful()
Returns true if this result was successfully authentication.
Signature
- It returns a
boolvalue.
getAuthContext()
Since Matomo Matomo
Returns optional context payload set during authentication.
Signature
- Returns:
Piwik\array<string,mixed>|null—