PHP 클래스 Namshi\JOSE\SimpleJWS

상속: extends JWS
파일 보기 프로젝트 열기: namshi/jose 1 사용 예제들

공개 메소드들

메소드 설명
__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