PHP Класс Namshi\JOSE\SimpleJWS

Наследование: extends JWS
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
__construct ( array $header = [], $encryptionEngine = 'OpenSSL' ) Constructor.
isExpired ( ) : boolean Checks whether the token is expired based on the 'exp' value.
isValid ( resource | string $key, string $algo = null ) : boolean Checks that the JWS has been signed with a valid private key by verifying it with a public $key and the token is not expired.
setPayload ( array $payload ) Sets the payload of the current JWS with an issued at value in the 'iat' property.

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

__construct() публичный Метод

Constructor.
См. также: http://php.net/manual/en/function.json-encode.php
См. также: http://php.net/manual/en/jsonserializable.jsonserialize.php
См. также: https://tools.ietf.org/html/draft-ietf-jose-json-web-signature-41#section-4 }
public __construct ( array $header = [], $encryptionEngine = 'OpenSSL' )
$header array An associative array of headers. The value can be any type accepted by json_encode or a JSON serializable object

isExpired() публичный Метод

it.
public isExpired ( ) : boolean
Результат boolean

isValid() публичный Метод

Checks that the JWS has been signed with a valid private key by verifying it with a public $key and the token is not expired.
public isValid ( resource | string $key, string $algo = null ) : boolean
$key resource | string
$algo string The algorithms this JWS should be signed with. Use it if you want to restrict which algorithms you want to allow to be validated.
Результат boolean

setPayload() публичный Метод

Sets the payload of the current JWS with an issued at value in the 'iat' property.
public setPayload ( array $payload )
$payload array