PHP Class Neos\Flow\Security\Account

Afficher le fichier Open project: neos/flow-development-collection Class Usage Examples

Protected Properties

Свойство Type Description
$accountIdentifier string
$authenticationProviderName string
$creationDate DateTime
$credentialsSource string
$expirationDate DateTime
$failedAuthenticationCount integer
$lastSuccessfulAuthenticationDate DateTime
$now Neos\Flow\Utility\Now
$objectManager Neos\Flow\ObjectManagement\ObjectManagerInterface
$policyService Neos\Flow\Security\Policy\PolicyService
$roleIdentifiers of strings
$roles array

Méthodes publiques

Méthode Description
__construct ( ) Upon creation the creationDate property is initialized.
addRole ( Role $role ) : void Adds a role to this account
authenticationAttempted ( integer $authenticationStatus ) : void Sets the authentication status. Usually called by the responsible \Neos\Flow\Security\Authentication\AuthenticationManagerInterface
getAccountIdentifier ( ) : string Returns the account identifier
getAuthenticationProviderName ( ) : string Returns the authentication provider name this account corresponds to
getCreationDate ( ) : DateTime Returns the date on which this account has been created.
getCredentialsSource ( ) : mixed Returns the credentials source
getExpirationDate ( ) : DateTime Returns the date on which this account has expired or will expire. If no expiration date has been set, NULL is returned.
getFailedAuthenticationCount ( ) : integer
getLastSuccessfulAuthenticationDate ( ) : DateTime
getRoles ( ) : array Returns the roles this account has assigned
hasRole ( Role $role ) : boolean Return if the account has a certain role
isActive ( ) : boolean Returns TRUE if it is currently allowed to use this account for authentication.
removeRole ( Role $role ) : void Removes a role from this account
setAccountIdentifier ( string $accountIdentifier ) : void Set the account identifier
setAuthenticationProviderName ( string $authenticationProviderName ) : void Set the authentication provider name this account corresponds to
setCredentialsSource ( mixed $credentialsSource ) : void Sets the credentials source
setExpirationDate ( DateTime $expirationDate = null ) : void Sets the date on which this account will become inactive
setRoles ( array $roles ) : void Sets the roles for this account

Méthodes protégées

Méthode Description
initializeRoles ( ) : void Initializes the roles field by fetching the role objects referenced by the roleIdentifiers

Method Details

__construct() public méthode

Upon creation the creationDate property is initialized.
public __construct ( )

addRole() public méthode

Adds a role to this account
public addRole ( Role $role ) : void
$role Neos\Flow\Security\Policy\Role
Résultat void

authenticationAttempted() public méthode

Sets the authentication status. Usually called by the responsible \Neos\Flow\Security\Authentication\AuthenticationManagerInterface
public authenticationAttempted ( integer $authenticationStatus ) : void
$authenticationStatus integer One of WRONG_CREDENTIALS, AUTHENTICATION_SUCCESSFUL
Résultat void

getAccountIdentifier() public méthode

Returns the account identifier
public getAccountIdentifier ( ) : string
Résultat string The account identifier

getAuthenticationProviderName() public méthode

Returns the authentication provider name this account corresponds to
public getAuthenticationProviderName ( ) : string
Résultat string The authentication provider name

getCreationDate() public méthode

Returns the date on which this account has been created.
public getCreationDate ( ) : DateTime
Résultat DateTime

getCredentialsSource() public méthode

Returns the credentials source
public getCredentialsSource ( ) : mixed
Résultat mixed The credentials source

getExpirationDate() public méthode

Returns the date on which this account has expired or will expire. If no expiration date has been set, NULL is returned.
public getExpirationDate ( ) : DateTime
Résultat DateTime

getFailedAuthenticationCount() public méthode

getLastSuccessfulAuthenticationDate() public méthode

public getLastSuccessfulAuthenticationDate ( ) : DateTime
Résultat DateTime

getRoles() public méthode

Returns the roles this account has assigned
public getRoles ( ) : array
Résultat array

hasRole() public méthode

Return if the account has a certain role
public hasRole ( Role $role ) : boolean
$role Neos\Flow\Security\Policy\Role
Résultat boolean

initializeRoles() protected méthode

Initializes the roles field by fetching the role objects referenced by the roleIdentifiers
protected initializeRoles ( ) : void
Résultat void

isActive() public méthode

Returns FALSE if the account has expired.
public isActive ( ) : boolean
Résultat boolean

removeRole() public méthode

Removes a role from this account
public removeRole ( Role $role ) : void
$role Neos\Flow\Security\Policy\Role
Résultat void

setAccountIdentifier() public méthode

Set the account identifier
public setAccountIdentifier ( string $accountIdentifier ) : void
$accountIdentifier string The account identifier
Résultat void

setAuthenticationProviderName() public méthode

Set the authentication provider name this account corresponds to
public setAuthenticationProviderName ( string $authenticationProviderName ) : void
$authenticationProviderName string The authentication provider name
Résultat void

setCredentialsSource() public méthode

Sets the credentials source
public setCredentialsSource ( mixed $credentialsSource ) : void
$credentialsSource mixed The credentials source
Résultat void

setExpirationDate() public méthode

Sets the date on which this account will become inactive
public setExpirationDate ( DateTime $expirationDate = null ) : void
$expirationDate DateTime
Résultat void

setRoles() public méthode

Sets the roles for this account
public setRoles ( array $roles ) : void
$roles array
Résultat void

Property Details

$accountIdentifier protected_oe property

protected string $accountIdentifier
Résultat string

$authenticationProviderName protected_oe property

protected string $authenticationProviderName
Résultat string

$creationDate protected_oe property

protected DateTime $creationDate
Résultat DateTime

$credentialsSource protected_oe property

protected string $credentialsSource
Résultat string

$expirationDate protected_oe property

protected DateTime $expirationDate
Résultat DateTime

$failedAuthenticationCount protected_oe property

protected int $failedAuthenticationCount
Résultat integer

$lastSuccessfulAuthenticationDate protected_oe property

protected DateTime $lastSuccessfulAuthenticationDate
Résultat DateTime

$now protected_oe property

protected Now,Neos\Flow\Utility $now
Résultat Neos\Flow\Utility\Now

$objectManager protected_oe property

protected ObjectManagerInterface,Neos\Flow\ObjectManagement $objectManager
Résultat Neos\Flow\ObjectManagement\ObjectManagerInterface

$policyService protected_oe property

protected PolicyService,Neos\Flow\Security\Policy $policyService
Résultat Neos\Flow\Security\Policy\PolicyService

$roleIdentifiers protected_oe property

of strings
protected $roleIdentifiers

$roles protected_oe property

protected array $roles
Résultat array