PHP Class Neos\Flow\Security\Authentication\Token\AbstractToken

Inheritance: implements Neos\Flow\Security\Authentication\TokenInterface
Show file Open project: neos/flow-development-collection Class Usage Examples

Protected Properties

Property Type Description
$account Neos\Flow\Security\Account
$authenticationProviderName string
$authenticationStatus integer Current authentication status of this token
$credentials array The credentials submitted by the client
$entryPoint Neos\Flow\Security\Authentication\EntryPointInterface The authentication entry point
$requestPatterns array

Public Methods

Method Description
__toString ( ) : string Returns a string representation of the token for logging purposes.
getAccount ( ) : Account Returns the account if one is authenticated, NULL otherwise.
getAuthenticationEntryPoint ( ) : Neos\Flow\Security\Authentication\EntryPointInterface Returns the configured authentication entry point, NULL if none is available
getAuthenticationProviderName ( ) : string Returns the name of the authentication provider responsible for this token
getAuthenticationStatus ( ) : integer Returns the current authentication status
getCredentials ( ) : array Returns the credentials (username and password) of this token.
getRequestPatterns ( ) : array<\Neos\Flow\Security\RequestPatternInterface> Returns an array of set \Neos\Flow\Security\RequestPatternInterface, NULL if none was set
hasRequestPatterns ( ) : boolean Returns TRUE if any request pattern has been defined
isAuthenticated ( ) : boolean Returns TRUE if this token is currently authenticated
setAccount ( Account $account = null ) : void Set the (authenticated) account
setAuthenticationEntryPoint ( Neos\Flow\Security\Authentication\EntryPointInterface $entryPoint ) : void Sets the authentication entry point
setAuthenticationProviderName ( string $authenticationProviderName ) : void Sets the name of the authentication provider responsible for this token
setAuthenticationStatus ( integer $authenticationStatus ) : void Sets the authentication status. Usually called by the responsible \Neos\Flow\Security\Authentication\AuthenticationManagerInterface
setRequestPatterns ( array $requestPatterns ) : void Sets request patterns

Method Details

__toString() public method

Returns a string representation of the token for logging purposes.
public __toString ( ) : string
return string The class name

getAccount() public method

Returns the account if one is authenticated, NULL otherwise.
public getAccount ( ) : Account
return Neos\Flow\Security\Account An account object

getAuthenticationEntryPoint() public method

Returns the configured authentication entry point, NULL if none is available
public getAuthenticationEntryPoint ( ) : Neos\Flow\Security\Authentication\EntryPointInterface
return Neos\Flow\Security\Authentication\EntryPointInterface The configured authentication entry point, NULL if none is available

getAuthenticationProviderName() public method

Returns the name of the authentication provider responsible for this token
public getAuthenticationProviderName ( ) : string
return string The authentication provider name

getAuthenticationStatus() public method

Returns the current authentication status
public getAuthenticationStatus ( ) : integer
return integer One of NO_CREDENTIALS_GIVEN, WRONG_CREDENTIALS, AUTHENTICATION_SUCCESSFUL, AUTHENTICATION_NEEDED

getCredentials() public method

Returns the credentials (username and password) of this token.
public getCredentials ( ) : array
return array $credentials The needed credentials to authenticate this token

getRequestPatterns() public method

Returns an array of set \Neos\Flow\Security\RequestPatternInterface, NULL if none was set
See also: hasRequestPattern()
public getRequestPatterns ( ) : array<\Neos\Flow\Security\RequestPatternInterface>
return array<\Neos\Flow\Security\RequestPatternInterface>

hasRequestPatterns() public method

Returns TRUE if any request pattern has been defined
public hasRequestPatterns ( ) : boolean
return boolean

isAuthenticated() public method

Returns TRUE if this token is currently authenticated
public isAuthenticated ( ) : boolean
return boolean TRUE if this this token is currently authenticated

setAccount() public method

Set the (authenticated) account
public setAccount ( Account $account = null ) : void
$account Neos\Flow\Security\Account An account object
return void

setAuthenticationEntryPoint() public method

Sets the authentication entry point
public setAuthenticationEntryPoint ( Neos\Flow\Security\Authentication\EntryPointInterface $entryPoint ) : void
$entryPoint Neos\Flow\Security\Authentication\EntryPointInterface The authentication entry point
return void

setAuthenticationProviderName() public method

Sets the name of the authentication provider responsible for this token
public setAuthenticationProviderName ( string $authenticationProviderName ) : void
$authenticationProviderName string The authentication provider name
return void

setAuthenticationStatus() public method

Sets the authentication status. Usually called by the responsible \Neos\Flow\Security\Authentication\AuthenticationManagerInterface
public setAuthenticationStatus ( integer $authenticationStatus ) : void
$authenticationStatus integer One of NO_CREDENTIALS_GIVEN, WRONG_CREDENTIALS, AUTHENTICATION_SUCCESSFUL, AUTHENTICATION_NEEDED
return void

setRequestPatterns() public method

Sets request patterns
public setRequestPatterns ( array $requestPatterns ) : void
$requestPatterns array Array of RequestPatternInterface to be set
return void

Property Details

$account protected property

protected Account,Neos\Flow\Security $account
return Neos\Flow\Security\Account

$authenticationProviderName protected property

protected string $authenticationProviderName
return string

$authenticationStatus protected property

Current authentication status of this token
protected int $authenticationStatus
return integer

$credentials protected property

The credentials submitted by the client
protected array $credentials
return array

$entryPoint protected property

The authentication entry point
protected EntryPointInterface,Neos\Flow\Security\Authentication $entryPoint
return Neos\Flow\Security\Authentication\EntryPointInterface

$requestPatterns protected property

protected array $requestPatterns
return array