PHP Class Neos\Flow\Security\Authentication\AuthenticationProviderManager

Inheritance: implements Neos\Flow\Security\Authentication\AuthenticationManagerInterface
Afficher le fichier Open project: neos/flow-development-collection Class Usage Examples

Protected Properties

Свойство Type Description
$isAuthenticated boolean
$providerResolver AuthenticationProviderResolver The provider resolver
$providers array
$requestPatternResolver Neos\Flow\Security\RequestPatternResolver The request pattern resolver
$securityContext Neos\Flow\Security\Context The security context of the current request
$securityLogger Neos\Flow\Log\SecurityLoggerInterface
$session Neos\Flow\Session\SessionInterface
$tokens array

Méthodes publiques

Méthode Description
__construct ( AuthenticationProviderResolver $providerResolver, RequestPatternResolver $requestPatternResolver )
authenticate ( ) : void Tries to authenticate the tokens in the security context (in the given order) with the available authentication providers, if needed.
getProviders ( ) : array Returns all configured authentication providers
getSecurityContext ( ) : Context Returns the security context
getTokens ( ) : array Returns clean tokens this manager is responsible for.
injectSettings ( array $settings ) : void Inject the settings and does a fresh build of tokens based on the injected settings
isAuthenticated ( ) : boolean Checks if one or all tokens are authenticated (depending on the authentication strategy).
logout ( ) : void Logout all active authentication tokens
setSecurityContext ( Context $securityContext ) : void Sets the security context

Méthodes protégées

Méthode Description
buildProvidersAndTokensFromConfiguration ( array $providerConfigurations ) : void Builds the provider and token objects based on the given configuration
emitAuthenticatedToken ( Neos\Flow\Security\Authentication\TokenInterface $token ) : void Signals that the specified token has been successfully authenticated.
emitLoggedOut ( ) : void Signals that all active authentication tokens have been invalidated.

Method Details

__construct() public méthode

public __construct ( AuthenticationProviderResolver $providerResolver, RequestPatternResolver $requestPatternResolver )
$providerResolver AuthenticationProviderResolver The provider resolver
$requestPatternResolver Neos\Flow\Security\RequestPatternResolver The request pattern resolver

authenticate() public méthode

If the authentication strategy is set to "allTokens", all tokens have to be authenticated. If the strategy is set to "oneToken", only one token needs to be authenticated, but the authentication will stop after the first authenticated token. The strategy "atLeastOne" will try to authenticate at least one and as many tokens as possible.
public authenticate ( ) : void
Résultat void

buildProvidersAndTokensFromConfiguration() protected méthode

Builds the provider and token objects based on the given configuration
protected buildProvidersAndTokensFromConfiguration ( array $providerConfigurations ) : void
$providerConfigurations array The configured provider settings
Résultat void

emitAuthenticatedToken() protected méthode

Signals that the specified token has been successfully authenticated.
protected emitAuthenticatedToken ( Neos\Flow\Security\Authentication\TokenInterface $token ) : void
$token Neos\Flow\Security\Authentication\TokenInterface The token which has been authenticated
Résultat void

emitLoggedOut() protected méthode

Note: the session will be destroyed after this signal has been emitted.
protected emitLoggedOut ( ) : void
Résultat void

getProviders() public méthode

Returns all configured authentication providers
public getProviders ( ) : array
Résultat array Array of \Neos\Flow\Security\Authentication\AuthenticationProviderInterface

getSecurityContext() public méthode

Returns the security context
public getSecurityContext ( ) : Context
Résultat Neos\Flow\Security\Context $securityContext The security context of the current request

getTokens() public méthode

Note: The order of the tokens in the array is important, as the tokens will be authenticated in the given order.
public getTokens ( ) : array
Résultat array Array of TokenInterface this manager is responsible for

injectSettings() public méthode

Inject the settings and does a fresh build of tokens based on the injected settings
public injectSettings ( array $settings ) : void
$settings array The settings
Résultat void

isAuthenticated() public méthode

Will call authenticate() if not done before.
public isAuthenticated ( ) : boolean
Résultat boolean

logout() public méthode

Logout all active authentication tokens
public logout ( ) : void
Résultat void

setSecurityContext() public méthode

Sets the security context
public setSecurityContext ( Context $securityContext ) : void
$securityContext Neos\Flow\Security\Context The security context of the current request
Résultat void

Property Details

$isAuthenticated protected_oe property

protected bool $isAuthenticated
Résultat boolean

$providerResolver protected_oe property

The provider resolver
protected AuthenticationProviderResolver,Neos\Flow\Security\Authentication $providerResolver
Résultat AuthenticationProviderResolver

$providers protected_oe property

protected array $providers
Résultat array

$requestPatternResolver protected_oe property

The request pattern resolver
protected RequestPatternResolver,Neos\Flow\Security $requestPatternResolver
Résultat Neos\Flow\Security\RequestPatternResolver

$securityContext protected_oe property

The security context of the current request
protected Context,Neos\Flow\Security $securityContext
Résultat Neos\Flow\Security\Context

$securityLogger protected_oe property

protected SecurityLoggerInterface,Neos\Flow\Log $securityLogger
Résultat Neos\Flow\Log\SecurityLoggerInterface

$session protected_oe property

protected SessionInterface,Neos\Flow\Session $session
Résultat Neos\Flow\Session\SessionInterface

$tokens protected_oe property

protected array $tokens
Résultat array