Method | Description | |
---|---|---|
__construct ( string $firewallKey, |
Constructor. | |
createPasswordHash ( string $password ) : string | Create a hash for the given password. | |
getAnonymousAccess ( ) : boolean | Check if anonymous access is allowed or not. | |
getConfig ( ) : |
Get config for current firewall. | |
getFirewallKey ( ) : string | Returns the name of the current firewall. Don't mistake it for realm name. | |
getRealmName ( ) : string | Get realm name. | |
getToken ( ) : |
Get the current token. | |
getUser ( ) : boolean | |
Tries to retrieve the user from current token. | |
isUserAllowedAccess ( ) : boolean | Checks if current user has access to current area based by access rules. | |
processLogin ( string $authProvider = '' ) : boolean | Call this method on your login submit page, it will trigger the authentication provider and validate the provided credentials. | |
processLogout ( ) | This method deletes user auth token and calls the logoutCallback on current login provider. | |
verifyPasswordHash ( string $password, string $hash ) : boolean | Verify if the $password matches the $hash. |
Method | Description | |
---|---|---|
authenticate ( |
Method that validates the submitted credentials with defined firewall user providers. | |
getAuthProvider ( string $authProvider ) : Webiny\Component\Security\Authentication\Providers\AuthenticationInterface | Get the authentication provider. | |
getAuthProviderConfig ( string $authProvider ) : |
Returns the config of current auth provider. | |
getTokenName ( ) : string | Returns the token name. | |
initRoleHierarchy ( ) | Initializes role hierarchy. | |
initToken ( ) | Initializes the Token. | |
setUserRoles ( ) | Sets roles for current user. |
public __construct ( string $firewallKey, |
||
$firewallKey | string | Name of the current firewall. |
$firewallConfig | Firewall config. | |
$userProviders | array | Array of user providers for this firewall. |
$encoder | Instance of encoder for this firewall. |
public createPasswordHash ( string $password ) : string | ||
$password | string | |
return | string | Password hash. |
public getAnonymousAccess ( ) : boolean | ||
return | boolean | Is anonymous access allowed or not. |
public getConfig ( ) : |
||
return |
public getFirewallKey ( ) : string | ||
return | string |
public getRealmName ( ) : string | ||
return | string | Realm name. |
public getToken ( ) : |
||
return |
public isUserAllowedAccess ( ) : boolean | ||
return | boolean |
public processLogin ( string $authProvider = '' ) : boolean | ||
$authProvider | string | Name of the auth provider you wish to use to process the login. If you don't set it, the first registered provider will be used. |
return | boolean | True if login is valid, false if login has failed. |
public processLogout ( ) |