interface PasswordTokenInterface implements TokenInterface (View source)

Interface for authentication tokens which only hold a password

Methods

string
getAuthenticationProviderName()

Returns the name of the authentication provider responsible for this token

void
setAuthenticationProviderName(string $authenticationProviderName)

Sets the name of the authentication provider responsible for this token

bool
isAuthenticated()

Returns true if this token is currently authenticated

void
setAuthenticationStatus(int $authenticationStatus)

Sets the authentication status. Usually called by the responsible AuthenticationManagerInterface

int
getAuthenticationStatus()

Returns the current authentication status

void
setAuthenticationEntryPoint(EntryPointInterface $entryPoint)

Sets the authentication entry point

getAuthenticationEntryPoint()

Returns the configured authentication entry point, NULL if none is available

bool
hasRequestPatterns()

Returns true if \Neos\Flow\Security\RequestPattern were set

void
setRequestPatterns(array $requestPatterns)

Sets request patterns

array
getRequestPatterns()

Returns an array of set \Neos\Flow\Security\RequestPatternInterface, NULL if none was set

bool
updateCredentials(ActionRequest $actionRequest)

Updates the authentication credentials, the authentication manager needs to authenticate this token.

mixed
getCredentials()

Returns the credentials of this token. The type depends on the provider of the token.

getAccount()

Returns the account if one is authenticated, NULL otherwise.

void
setAccount(Account $account = null)

Set the (authenticated) account

string
__toString()

Returns a string representation of the token for logging purposes.

string
getPassword()

No description

Details

string getAuthenticationProviderName()

Returns the name of the authentication provider responsible for this token

Return Value

string

The authentication provider name

void setAuthenticationProviderName(string $authenticationProviderName)

Sets the name of the authentication provider responsible for this token

Parameters

string $authenticationProviderName

The authentication provider name

Return Value

void

bool isAuthenticated()

Returns true if this token is currently authenticated

Return Value

bool

true if this this token is currently authenticated

void setAuthenticationStatus(int $authenticationStatus)

Sets the authentication status. Usually called by the responsible AuthenticationManagerInterface

Parameters

int $authenticationStatus

One of NO_CREDENTIALS_GIVEN, WRONG_CREDENTIALS, AUTHENTICATION_SUCCESSFUL

Return Value

void

int getAuthenticationStatus()

Returns the current authentication status

Return Value

int

One of NO_CREDENTIALS_GIVEN, WRONG_CREDENTIALS, AUTHENTICATION_SUCCESSFUL, REAUTHENTICATION_NEEDED

void setAuthenticationEntryPoint(EntryPointInterface $entryPoint)

Sets the authentication entry point

Parameters

EntryPointInterface $entryPoint

The authentication entry point

Return Value

void

EntryPointInterface getAuthenticationEntryPoint()

Returns the configured authentication entry point, NULL if none is available

Return Value

EntryPointInterface

The configured authentication entry point, NULL if none is available

bool hasRequestPatterns()

Returns true if \Neos\Flow\Security\RequestPattern were set

Return Value

bool

True if a \Neos\Flow\Security\RequestPatternInterface was set

void setRequestPatterns(array $requestPatterns)

Sets request patterns

Parameters

array $requestPatterns

Array of \Neos\Flow\Security\RequestPatternInterface to be set

Return Value

void

See also

hasRequestPattern()

array getRequestPatterns()

Returns an array of set \Neos\Flow\Security\RequestPatternInterface, NULL if none was set

Return Value

array

Array of set request patterns

See also

hasRequestPattern()

bool updateCredentials(ActionRequest $actionRequest)

Updates the authentication credentials, the authentication manager needs to authenticate this token.

This could be a username/password from a login controller. This method is called while initializing the security context. By returning true you make sure that the authentication manager will (re-)authenticate the tokens with the current credentials. Note: You should not persist the credentials!

Parameters

ActionRequest $actionRequest

The current request instance

Return Value

bool

true if this token needs to be (re-)authenticated

mixed getCredentials()

Returns the credentials of this token. The type depends on the provider of the token.

Return Value

mixed

$credentials The needed credentials to authenticate this token

Account getAccount()

Returns the account if one is authenticated, NULL otherwise.

Return Value

Account

An account object

void setAccount(Account $account = null)

Set the (authenticated) account

Parameters

Account $account

An account object

Return Value

void

string __toString()

Returns a string representation of the token for logging purposes.

Return Value

string

A string representation of the token

string getPassword()

No description

Return Value

string

The password this token represents