PHP 클래스 Namshi\JOSE\JWS

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

보호된 프로퍼티들

프로퍼티 타입 설명
$encodedSignature
$encryptionEngine
$isSigned
$signature
$supportedEncryptionEngines

공개 메소드들

메소드 설명
__construct ( array $header = [], string $encryptionEngine = 'OpenSSL' ) Constructor.
getEncodedSignature ( ) : string Returns the base64 encoded signature.
getSignature ( ) : string Returns the signature representation of the JWS.
getTokenString ( ) : string Returns the string representing the JWT.
isSigned ( ) : boolean Checks whether the JSW has already been signed.
load ( string $jwsTokenString, boolean $allowUnsecure = false, Namshi\JOSE\Base64\Encoder $encoder = null, string $encryptionEngine = 'OpenSSL' ) : JWS Creates an instance of a JWS from a JWT.
setEncodedSignature ( string $encodedSignature ) : JWS Sets the base64 encoded signature.
sign ( resource | string $key, $password = null ) : string Signs the JWS signininput.
verify ( resource | string $key, string $algo = null ) : boolean Verifies that the internal signin input corresponds to the encoded signature previously stored (@see JWS::load).

보호된 메소드들

메소드 설명
getSigner ( ) : Namshi\JOSE\Signer\SignerInterface Returns the signer responsible to encrypting / decrypting this JWS.

메소드 상세

__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 = [], string $encryptionEngine = 'OpenSSL' )
$header array An associative array of headers. The value can be any type accepted by json_encode or a JSON serializable object
$encryptionEngine string }

getEncodedSignature() 공개 메소드

Returns the base64 encoded signature.
public getEncodedSignature ( ) : string
리턴 string

getSignature() 공개 메소드

Returns the signature representation of the JWS.
public getSignature ( ) : string
리턴 string

getSigner() 보호된 메소드

Returns the signer responsible to encrypting / decrypting this JWS.
protected getSigner ( ) : Namshi\JOSE\Signer\SignerInterface
리턴 Namshi\JOSE\Signer\SignerInterface

getTokenString() 공개 메소드

Returns the string representing the JWT.
public getTokenString ( ) : string
리턴 string

isSigned() 공개 메소드

Checks whether the JSW has already been signed.
public isSigned ( ) : boolean
리턴 boolean

load() 공개 정적인 메소드

Creates an instance of a JWS from a JWT.
public static load ( string $jwsTokenString, boolean $allowUnsecure = false, Namshi\JOSE\Base64\Encoder $encoder = null, string $encryptionEngine = 'OpenSSL' ) : JWS
$jwsTokenString string
$allowUnsecure boolean
$encoder Namshi\JOSE\Base64\Encoder
$encryptionEngine string
리턴 JWS

setEncodedSignature() 공개 메소드

Sets the base64 encoded signature.
public setEncodedSignature ( string $encodedSignature ) : JWS
$encodedSignature string
리턴 JWS

sign() 공개 메소드

Signs the JWS signininput.
public sign ( resource | string $key, $password = null ) : string
$key resource | string
리턴 string

verify() 공개 메소드

Verifies that the internal signin input corresponds to the encoded signature previously stored (@see JWS::load).
public verify ( 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

프로퍼티 상세

$encodedSignature 보호되어 있는 프로퍼티

protected $encodedSignature

$encryptionEngine 보호되어 있는 프로퍼티

protected $encryptionEngine

$isSigned 보호되어 있는 프로퍼티

protected $isSigned

$signature 보호되어 있는 프로퍼티

protected $signature

$supportedEncryptionEngines 보호되어 있는 프로퍼티

protected $supportedEncryptionEngines