PHP Interface Jose\Object\SignatureInterface

This interface is required by the SignerInterface to signed payloads and create a JWS.
Datei anzeigen Open project: spomky-labs/jose Interface Usage Examples

Public Methods

Method Description
createSignature ( Jose\Object\JWKInterface $signature_key, array $protected_headers, array $headers ) : Jose\Object\Signature
createSignatureFromLoadedData ( string $signature, string | null $encoded_protected_headers, array $headers ) : Jose\Object\Signature
getAllHeaders ( ) : array The protected and unprotected header associated with the signature.
getEncodedProtectedHeaders ( ) : null | string The protected header associated with the signature.
getHeader ( string $key ) : mixed | null Returns the value of the unprotected header of the specified key.
getHeaders ( ) : array The unprotected header associated with the signature.
getProtectedHeader ( string $key ) : mixed | null Returns the value of the protected header of the specified key.
getProtectedHeaders ( ) : array The protected header associated with the signature.
getSignature ( ) : string Returns the value of the signature.
getSignatureKey ( ) : Jose\Object\JWKInterface
hasHeader ( string $key ) : boolean
hasProtectedHeader ( string $key ) : boolean

Method Details

createSignature() public static method

public static createSignature ( Jose\Object\JWKInterface $signature_key, array $protected_headers, array $headers ) : Jose\Object\Signature
$signature_key Jose\Object\JWKInterface
$protected_headers array
$headers array
return Jose\Object\Signature

createSignatureFromLoadedData() public static method

public static createSignatureFromLoadedData ( string $signature, string | null $encoded_protected_headers, array $headers ) : Jose\Object\Signature
$signature string
$encoded_protected_headers string | null
$headers array
return Jose\Object\Signature

getAllHeaders() public method

The protected and unprotected header associated with the signature.
public getAllHeaders ( ) : array
return array

getEncodedProtectedHeaders() public method

The protected header associated with the signature.

getHeader() public method

Returns the value of the unprotected header of the specified key.
public getHeader ( string $key ) : mixed | null
$key string The key
return mixed | null Header value

getHeaders() public method

The unprotected header associated with the signature.
public getHeaders ( ) : array
return array

getProtectedHeader() public method

Returns the value of the protected header of the specified key.
public getProtectedHeader ( string $key ) : mixed | null
$key string The key
return mixed | null Header value

getProtectedHeaders() public method

The protected header associated with the signature.
public getProtectedHeaders ( ) : array
return array

getSignature() public method

Returns the value of the signature.
public getSignature ( ) : string
return string

getSignatureKey() public method

public getSignatureKey ( ) : Jose\Object\JWKInterface
return Jose\Object\JWKInterface

hasHeader() public method

public hasHeader ( string $key ) : boolean
$key string The key
return boolean

hasProtectedHeader() public method

public hasProtectedHeader ( string $key ) : boolean
$key string The key
return boolean