PHP 클래스 Neos\Flow\Security\DummyContext

These information can be set manually on the context as needed.
상속: extends Context
파일 보기 프로젝트 열기: neos/flow-development-collection

보호된 프로퍼티들

프로퍼티 타입 설명
$csrfProtectionToken string
$initialized boolean TRUE if the context is initialized in the current request, FALSE or NULL otherwise.
$interceptedRequest Neos\Flow\Mvc\RequestInterface
$roles Neos\Flow\Security\Policy\Role[]
$tokens array Array of configured tokens (might have request patterns)

공개 메소드들

메소드 설명
clearContext ( ) : void Clears the security context.
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.
getCsrfProtectionToken ( ) : string Returns the current CSRF protection token. A new one is created when needed, depending on the configured CSRF protection strategy.
getInterceptedRequest ( ) : ActionRequest 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 ( ) : Role[] 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.
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
setAuthenticationTokens ( array $tokens ) : array Sets the Authentication\Tokens of the security context which should be active.
setCsrfProtectionToken ( string $csrfProtectionToken ) : void
setInitialized ( boolean $initialized ) : void
setInterceptedRequest ( ActionRequest $interceptedRequest = null ) : void Sets an action request, to be stored for later resuming after it has been intercepted by a security exception.
setRoles ( Role[] $roles ) : void Set an array of role objects.

메소드 상세

clearContext() 공개 메소드

Clears the security context.
public clearContext ( ) : void
리턴 void

getAuthenticationStrategy() 공개 메소드

Get the token authentication strategy
public getAuthenticationStrategy ( ) : integer
리턴 integer One of the AUTHENTICATE_* constants

getAuthenticationTokens() 공개 메소드

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.
public getAuthenticationTokens ( ) : Neos\Flow\Security\Authentication\TokenInterface[]
리턴 Neos\Flow\Security\Authentication\TokenInterface[] Array of set tokens

getAuthenticationTokensOfType() 공개 메소드

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.
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

getCsrfProtectionToken() 공개 메소드

Returns the current CSRF protection token. A new one is created when needed, depending on the configured CSRF protection strategy.
public getCsrfProtectionToken ( ) : string
리턴 string

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.
public getInterceptedRequest ( ) : ActionRequest
리턴 Neos\Flow\Mvc\ActionRequest

getRoles() 공개 메소드

If no authenticated roles could be found the "Anonymous" role is returned. The "Neos.Flow:Everybody" roles is always returned.
public getRoles ( ) : Role[]
리턴 Neos\Flow\Security\Policy\Role[]

hasCsrfProtectionTokens() 공개 메소드

Returns TRUE if the context has CSRF protection tokens.
public hasCsrfProtectionTokens ( ) : boolean
리턴 boolean TRUE, if the token is valid. FALSE otherwise.

hasRole() 공개 메소드

Returns TRUE, if at least one of the currently authenticated accounts holds a role with the given identifier, also recursively.
public hasRole ( string $roleIdentifier ) : boolean
$roleIdentifier string The string representation of the role to search for
리턴 boolean TRUE, if a role with the given string representation was found

isCsrfProtectionTokenValid() 공개 메소드

Returns TRUE if the given string is a valid CSRF protection token. The token will be removed if the configured csrf strategy is 'onePerUri'.
public isCsrfProtectionTokenValid ( string $csrfToken ) : boolean
$csrfToken string The token string to be validated
리턴 boolean TRUE, if the token is valid. FALSE otherwise.

isInitialized() 공개 메소드

public isInitialized ( ) : boolean
리턴 boolean TRUE if the Context is initialized, FALSE otherwise.

setAuthenticationTokens() 공개 메소드

Sets the Authentication\Tokens of the security context which should be active.
public setAuthenticationTokens ( array $tokens ) : array
$tokens array Array of set tokens
리턴 array

setCsrfProtectionToken() 공개 메소드

public setCsrfProtectionToken ( string $csrfProtectionToken ) : void
$csrfProtectionToken string
리턴 void

setInitialized() 공개 메소드

public setInitialized ( boolean $initialized ) : void
$initialized boolean
리턴 void

setInterceptedRequest() 공개 메소드

Sets an action request, to be stored for later resuming after it has been intercepted by a security exception.
public setInterceptedRequest ( ActionRequest $interceptedRequest = null ) : void
$interceptedRequest Neos\Flow\Mvc\ActionRequest
리턴 void

setRoles() 공개 메소드

Set an array of role objects.
public setRoles ( Role[] $roles ) : void
$roles Neos\Flow\Security\Policy\Role[]
리턴 void

프로퍼티 상세

$csrfProtectionToken 보호되어 있는 프로퍼티

protected string $csrfProtectionToken
리턴 string

$initialized 보호되어 있는 프로퍼티

TRUE if the context is initialized in the current request, FALSE or NULL otherwise.
protected bool $initialized
리턴 boolean

$interceptedRequest 보호되어 있는 프로퍼티

protected RequestInterface,Neos\Flow\Mvc $interceptedRequest
리턴 Neos\Flow\Mvc\RequestInterface

$roles 보호되어 있는 프로퍼티

protected Role[],Neos\Flow\Security\Policy $roles
리턴 Neos\Flow\Security\Policy\Role[]

$tokens 보호되어 있는 프로퍼티

Array of configured tokens (might have request patterns)
protected array $tokens
리턴 array