PHP Class AppserverIo\Appserver\ServletEngine\Security\Utils\Util

Exibir arquivo Open project: appserver-io/appserver Class Usage Examples

Public Methods

Method Description
createPasswordHash ( string $hashAlgorithm, string $hashEncoding, string $hashCharset, string $name, string $password, mixed $callback ) : AppserverIo\Lang\String Creates and returns a hashed version of the passed password.
getRoleSets ( string $username, string $lookupName, string $rolesQuery, AppserverIo\Psr\Security\Auth\Spi\LoginModuleInterface $aslm ) : array Execute the rolesQuery against the dsJndiName to obtain the roles for the authenticated user.

Private Methods

Method Description
__clone ( ) : void This is a utility class, so protect it against cloning.
__construct ( ) This is a utility class, so protect it against direct instantiation.

Method Details

createPasswordHash() public static method

Creates and returns a hashed version of the passed password.
public static createPasswordHash ( string $hashAlgorithm, string $hashEncoding, string $hashCharset, string $name, string $password, mixed $callback ) : AppserverIo\Lang\String
$hashAlgorithm string The hash algorithm to use
$hashEncoding string The hash encoding to use
$hashCharset string The hash charset to use
$name string The login name
$password string The password credential
$callback mixed The callback providing some additional hashing functionality
return AppserverIo\Lang\String The hashed password

getRoleSets() public static method

Execute the rolesQuery against the dsJndiName to obtain the roles for the authenticated user.
public static getRoleSets ( string $username, string $lookupName, string $rolesQuery, AppserverIo\Psr\Security\Auth\Spi\LoginModuleInterface $aslm ) : array
$username string The username to load the roles for
$lookupName string The lookup name for the datasource
$rolesQuery string The query to load the roles
$aslm AppserverIo\Psr\Security\Auth\Spi\LoginModuleInterface The login module to add the roles to
return array An array of groups containing the sets of roles