PHP Класс AppserverIo\Appserver\ServletEngine\Security\Utils\Util

Автор: Tim Wagner ([email protected])
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
__clone ( ) : void This is a utility class, so protect it against cloning.
__construct ( ) This is a utility class, so protect it against direct instantiation.

Описание методов

createPasswordHash() публичный статический метод

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
Результат AppserverIo\Lang\String The hashed password

getRoleSets() публичный статический метод

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
Результат array An array of groups containing the sets of roles