Свойство | Тип | Описание | |
---|---|---|---|
$activeTokens | Neos\Flow\Security\Authentication\TokenInterface[] | Array of tokens currently active | |
$authenticationManager | Neos\Flow\Security\Authentication\AuthenticationManagerInterface | ||
$authenticationStrategy | integer | One of the AUTHENTICATE_* constants to set the authentication strategy. | |
$authorizationChecksDisabled | boolean | Whether authorization is disabled @see areAuthorizationChecksDisabled() | |
$contextHash | string | @see getContextHash() | |
$csrfProtectionStrategy | integer | One of the CSRF_* constants to set the csrf protection strategy | |
$csrfProtectionTokens | array | ||
$hashService | |||
$inactiveTokens | array | Array of tokens currently inactive | |
$initialized | boolean | TRUE if the context is initialized in the current request, FALSE or NULL otherwise. | |
$interceptedRequest | Neos\Flow\Mvc\RequestInterface | ||
$policyService | |||
$request | |||
$roles | |||
$securityLogger | Neos\Flow\Log\SecurityLoggerInterface | ||
$sessionManager | Neos\Flow\Session\SessionManagerInterface | ||
$tokenStatusLabels | array | ||
$tokens | array | Array of configured tokens (might have request patterns) |
Метод | Описание | |
---|---|---|
areAuthorizationChecksDisabled ( ) : boolean | Returns TRUE if authorization should be ignored, otherwise FALSE This is mainly useful to fetch records without Content Security to kick in (e.g. for AuthenticationProviders) | |
canBeInitialized ( ) : boolean | Check if the securityContext is ready to be initialized. Only after that security will be active. | |
clearContext ( ) : void | Clears the security context. | |
getAccount ( ) : |
Returns the account of the first authenticated authentication token. | |
getAccountByAuthenticationProviderName ( string $authenticationProviderName ) : |
Returns an authenticated account for the given provider or NULL if no account was authenticated or no token was registered for the given authentication provider name. | |
getAuthenticationStrategy ( ) : integer | Get the token authentication strategy | |
getAuthenticationTokens ( ) : Neos\Flow\Security\Authentication\TokenInterface[] | Returns all Authentication\Tokens of the security context which are active for the current request. If a token has a request pattern that cannot match against the current request it is determined as not active. | |
getAuthenticationTokensOfType ( string $className ) : Neos\Flow\Security\Authentication\TokenInterface[] | Returns all Authentication\Tokens of the security context which are active for the current request and of the given type. If a token has a request pattern that cannot match against the current request it is determined as not active. | |
getContextHash ( ) : string | Returns a hash that is unique for the current context, depending on hash components, @see setContextHashComponent() | |
getCsrfProtectionToken ( ) : string | Returns the current CSRF protection token. A new one is created when needed, depending on the configured CSRF protection strategy. | |
getInterceptedRequest ( ) : |
Returns the request, that has been stored for later resuming after it has been intercepted by a security exception, NULL if there is none. | |
getRoles ( ) : |
Returns the roles of all authenticated accounts, including inherited roles. | |
hasCsrfProtectionTokens ( ) : boolean | Returns TRUE if the context has CSRF protection tokens. | |
hasRole ( string $roleIdentifier ) : boolean | Returns TRUE, if at least one of the currently authenticated accounts holds a role with the given identifier, also recursively. | |
initialize ( ) : void | Initializes the security context for the given request. | |
injectAuthenticationManager ( Neos\Flow\Security\Authentication\AuthenticationManagerInterface $authenticationManager ) : void | Inject the authentication manager | |
injectSettings ( array $settings ) : void | Injects the configuration settings | |
isCsrfProtectionTokenValid ( string $csrfToken ) : boolean | Returns TRUE if the given string is a valid CSRF protection token. The token will be removed if the configured csrf strategy is 'onePerUri'. | |
isInitialized ( ) : boolean | ||
refreshRoles ( ) : void | Refreshes the currently effective roles. In fact the roles first level cache is reset and the effective roles get recalculated by calling getRoles(). | |
refreshTokens ( ) : void | Refreshes all active tokens by updating the credentials. | |
setInterceptedRequest ( |
Sets an action request, to be stored for later resuming after it has been intercepted by a security exception. | |
setRequest ( |
Set the current action request | |
shutdownObject ( ) : void | Shut the object down | |
withoutAuthorizationChecks ( Closure $callback ) : void | Lets you switch off authorization checks (CSRF token, policies, content security, . |
Метод | Описание | |
---|---|---|
isTokenActive ( Neos\Flow\Security\Authentication\TokenInterface $token ) : boolean | Evaluates any RequestPatterns of the given token to determine whether it is active for the current request - If no RequestPattern is configured for this token, it is active - Otherwise it is active only if at least one configured RequestPattern per type matches the request | |
mergeTokens ( array $managerTokens, array $sessionTokens ) : array | Merges the session and manager tokens. All manager tokens types will be in the result array If a specific type is found in the session this token replaces the one (of the same type) given by the manager. | |
separateActiveAndInactiveTokens ( ) : void | Stores all active tokens in $this->activeTokens, all others in $this->inactiveTokens | |
updateTokens ( array $tokens ) : void | Updates the token credentials for all tokens in the given array. |
public areAuthorizationChecksDisabled ( ) : boolean | ||
Результат | boolean |
public canBeInitialized ( ) : boolean | ||
Результат | boolean |
public clearContext ( ) : void | ||
Результат | void |
public getAccount ( ) : |
||
Результат | The authenticated account |
public getAccountByAuthenticationProviderName ( string $authenticationProviderName ) : |
||
$authenticationProviderName | string | Authentication provider name of the account to find |
Результат | The authenticated account |
public getAuthenticationStrategy ( ) : integer | ||
Результат | integer | One of the AUTHENTICATE_* constants |
public getAuthenticationTokens ( ) : Neos\Flow\Security\Authentication\TokenInterface[] | ||
Результат | Neos\Flow\Security\Authentication\TokenInterface[] | Array of set tokens |
public getAuthenticationTokensOfType ( string $className ) : Neos\Flow\Security\Authentication\TokenInterface[] | ||
$className | string | The class name |
Результат | Neos\Flow\Security\Authentication\TokenInterface[] | Array of set tokens of the specified type |
public getContextHash ( ) : string | ||
Результат | string |
public getCsrfProtectionToken ( ) : string | ||
Результат | string |
public getInterceptedRequest ( ) : |
||
Результат |
public getRoles ( ) : |
||
Результат |
public hasCsrfProtectionTokens ( ) : boolean | ||
Результат | boolean | TRUE, if the token is valid. FALSE otherwise. |
public initialize ( ) : void | ||
Результат | void |
public injectAuthenticationManager ( Neos\Flow\Security\Authentication\AuthenticationManagerInterface $authenticationManager ) : void | ||
$authenticationManager | Neos\Flow\Security\Authentication\AuthenticationManagerInterface | The authentication manager |
Результат | void |
public injectSettings ( array $settings ) : void | ||
$settings | array | |
Результат | void |
public isCsrfProtectionTokenValid ( string $csrfToken ) : boolean | ||
$csrfToken | string | The token string to be validated |
Результат | boolean | TRUE, if the token is valid. FALSE otherwise. |
public isInitialized ( ) : boolean | ||
Результат | boolean | TRUE if the Context is initialized, FALSE otherwise. |
protected isTokenActive ( Neos\Flow\Security\Authentication\TokenInterface $token ) : boolean | ||
$token | Neos\Flow\Security\Authentication\TokenInterface | |
Результат | boolean | TRUE if the given token is active, otherwise FALSE |
public refreshRoles ( ) : void | ||
Результат | void |
public refreshTokens ( ) : void | ||
Результат | void |
protected separateActiveAndInactiveTokens ( ) : void | ||
Результат | void |
public setInterceptedRequest ( |
||
$interceptedRequest | ||
Результат | void |
public setRequest ( |
||
$request | The current ActionRequest | |
Результат | void |
public shutdownObject ( ) : void | ||
Результат | void |
protected updateTokens ( array $tokens ) : void | ||
$tokens | array | Array of authentication tokens the credentials should be updated for |
Результат | void |
public withoutAuthorizationChecks ( Closure $callback ) : void | ||
$callback | Closure | |
Результат | void |
protected TokenInterface[],Neos\Flow\Security\Authentication $activeTokens | ||
Результат | Neos\Flow\Security\Authentication\TokenInterface[] |
protected AuthenticationManagerInterface,Neos\Flow\Security\Authentication $authenticationManager | ||
Результат | Neos\Flow\Security\Authentication\AuthenticationManagerInterface |
protected int $authenticationStrategy | ||
Результат | integer |
protected bool $authorizationChecksDisabled | ||
Результат | boolean |
protected string $contextHash | ||
Результат | string |
protected int $csrfProtectionStrategy | ||
Результат | integer |
protected HashService,Neos\Flow\Security\Cryptography $hashService | ||
Результат |
protected array $inactiveTokens | ||
Результат | array |
protected bool $initialized | ||
Результат | boolean |
protected RequestInterface,Neos\Flow\Mvc $interceptedRequest | ||
Результат | Neos\Flow\Mvc\RequestInterface |
protected PolicyService,Neos\Flow\Security\Policy $policyService | ||
Результат |
protected ActionRequest,Neos\Flow\Mvc $request | ||
Результат |
protected Role[],Neos\Flow\Security\Policy $roles | ||
Результат |
protected SecurityLoggerInterface,Neos\Flow\Log $securityLogger | ||
Результат | Neos\Flow\Log\SecurityLoggerInterface |
protected SessionManagerInterface,Neos\Flow\Session $sessionManager | ||
Результат | Neos\Flow\Session\SessionManagerInterface |
protected array $tokens | ||
Результат | array |