SecurityDataCollector

class SecurityDataCollector extends DataCollector

SecurityDataCollector.

Methods

serialize() from DataCollector
unserialize($data) from DataCollector
__construct(TokenStorageInterface $tokenStorage = null, RoleHierarchyInterface $roleHierarchy = null, LogoutUrlGenerator $logoutUrlGenerator = null, AccessDecisionManagerInterface $accessDecisionManager = null)

Constructor.

collect(Request $request, Response $response, Exception $exception = null)

Collects data for the given Request and Response.

bool isEnabled()

Checks if security is enabled.

string getUser()

Gets the user.

array getRoles()

Gets the roles of the user.

array getInheritedRoles()

Gets the inherited roles of the user.

bool supportsRoleHierarchy()

Checks if the data contains information about inherited roles. Still the inherited roles can be an empty array.

bool isAuthenticated()

Checks if the user is authenticated or not.

string getTokenClass()

Get the class name of the security token.

string getLogoutUrl()

Get the provider key (i.e. the name of the active firewall).

string[] getVoters()

Returns the FQCN of the security voters enabled in the application.

string getVoterStrategy()

Returns the strategy configured for the security voters.

array getAccessDecisionLog()

Returns the log of the security decisions made by the access decision manager.

string getName()

Returns the name of the collector.

Details

serialize()

unserialize($data)

Parameters

$data

__construct(TokenStorageInterface $tokenStorage = null, RoleHierarchyInterface $roleHierarchy = null, LogoutUrlGenerator $logoutUrlGenerator = null, AccessDecisionManagerInterface $accessDecisionManager = null)

Constructor.

Parameters

TokenStorageInterface $tokenStorage
RoleHierarchyInterface $roleHierarchy
LogoutUrlGenerator $logoutUrlGenerator
AccessDecisionManagerInterface $accessDecisionManager

collect(Request $request, Response $response, Exception $exception = null)

Collects data for the given Request and Response.

Parameters

Request $request A Request instance
Response $response A Response instance
Exception $exception An Exception instance

bool isEnabled()

Checks if security is enabled.

Return Value

bool true if security is enabled, false otherwise

string getUser()

Gets the user.

Return Value

string The user

array getRoles()

Gets the roles of the user.

Return Value

array The roles

array getInheritedRoles()

Gets the inherited roles of the user.

Return Value

array The inherited roles

bool supportsRoleHierarchy()

Checks if the data contains information about inherited roles. Still the inherited roles can be an empty array.

Return Value

bool true if the profile was contains inherited role information

bool isAuthenticated()

Checks if the user is authenticated or not.

Return Value

bool true if the user is authenticated, false otherwise

string getTokenClass()

Get the class name of the security token.

Return Value

string The token

string getLogoutUrl()

Get the provider key (i.e. the name of the active firewall).

Return Value

string The provider key

string[] getVoters()

Returns the FQCN of the security voters enabled in the application.

Return Value

string[]

string getVoterStrategy()

Returns the strategy configured for the security voters.

Return Value

string

array getAccessDecisionLog()

Returns the log of the security decisions made by the access decision manager.

Return Value

array

string getName()

Returns the name of the collector.

Return Value

string The collector name
doc_Symfony
2016-10-28 06:31:38
Comments
Leave a Comment

Please login to continue.