PHP Interface Jose\LoaderInterface

Mostrar archivo Open project: spomky-labs/jose Interface Usage Examples

Public Methods

Method Description
load ( string $input ) : Jose\Object\JWSInterface | Jose\Object\JWEInterface Load data and try to return a JWSInterface object, a JWEInterface object or a list of these objects.
loadAndDecryptUsingKey ( string $input, Jose\Object\JWKInterface $jwk, array $allowed_key_encryption_algorithms, array $allowed_content_encryption_algorithms, null | integer &$recipient_index = null ) : Jose\Object\JWSInterface | Jose\Object\JWEInterface
loadAndDecryptUsingKeySet ( string $input, Jose\Object\JWKSetInterface $jwk_set, array $allowed_key_encryption_algorithms, array $allowed_content_encryption_algorithms, null | integer &$recipient_index = null ) : Jose\Object\JWEInterface
loadAndVerifySignatureUsingKey ( string $input, Jose\Object\JWKInterface $jwk, array $allowed_algorithms, null | integer &$signature_index = null ) : Jose\Object\JWSInterface
loadAndVerifySignatureUsingKeyAndDetachedPayload ( string $input, Jose\Object\JWKInterface $jwk, array $allowed_algorithms, string $detached_payload, null | integer &$signature_index = null ) : Jose\Object\JWSInterface
loadAndVerifySignatureUsingKeySet ( string $input, Jose\Object\JWKSetInterface $jwk_set, array $allowed_algorithms, null | integer &$signature_index = null ) : Jose\Object\JWSInterface
loadAndVerifySignatureUsingKeySetAndDetachedPayload ( string $input, Jose\Object\JWKSetInterface $jwk_set, array $allowed_algorithms, string $detached_payload, null | integer &$signature_index = null ) : Jose\Object\JWSInterface

Method Details

load() public method

If the result is a JWE (list), nothing is decrypted and method decrypt must be executed If the result is a JWS (list), no signature is verified and method verifySignature must be executed.
public load ( string $input ) : Jose\Object\JWSInterface | Jose\Object\JWEInterface
$input string A string that represents a JSON Web Token message
return Jose\Object\JWSInterface | Jose\Object\JWEInterface If the data has been loaded.

loadAndDecryptUsingKey() public method

public loadAndDecryptUsingKey ( string $input, Jose\Object\JWKInterface $jwk, array $allowed_key_encryption_algorithms, array $allowed_content_encryption_algorithms, null | integer &$recipient_index = null ) : Jose\Object\JWSInterface | Jose\Object\JWEInterface
$input string
$jwk Jose\Object\JWKInterface
$allowed_key_encryption_algorithms array
$allowed_content_encryption_algorithms array
$recipient_index null | integer
return Jose\Object\JWSInterface | Jose\Object\JWEInterface If the data has been loaded.

loadAndDecryptUsingKeySet() public method

public loadAndDecryptUsingKeySet ( string $input, Jose\Object\JWKSetInterface $jwk_set, array $allowed_key_encryption_algorithms, array $allowed_content_encryption_algorithms, null | integer &$recipient_index = null ) : Jose\Object\JWEInterface
$input string
$jwk_set Jose\Object\JWKSetInterface
$allowed_key_encryption_algorithms array
$allowed_content_encryption_algorithms array
$recipient_index null | integer
return Jose\Object\JWEInterface If the data has been loaded.

loadAndVerifySignatureUsingKey() public method

public loadAndVerifySignatureUsingKey ( string $input, Jose\Object\JWKInterface $jwk, array $allowed_algorithms, null | integer &$signature_index = null ) : Jose\Object\JWSInterface
$input string
$jwk Jose\Object\JWKInterface
$allowed_algorithms array
$signature_index null | integer
return Jose\Object\JWSInterface If the data has been loaded.

loadAndVerifySignatureUsingKeyAndDetachedPayload() public method

public loadAndVerifySignatureUsingKeyAndDetachedPayload ( string $input, Jose\Object\JWKInterface $jwk, array $allowed_algorithms, string $detached_payload, null | integer &$signature_index = null ) : Jose\Object\JWSInterface
$input string
$jwk Jose\Object\JWKInterface
$allowed_algorithms array
$detached_payload string
$signature_index null | integer
return Jose\Object\JWSInterface If the data has been loaded.

loadAndVerifySignatureUsingKeySet() public method

public loadAndVerifySignatureUsingKeySet ( string $input, Jose\Object\JWKSetInterface $jwk_set, array $allowed_algorithms, null | integer &$signature_index = null ) : Jose\Object\JWSInterface
$input string
$jwk_set Jose\Object\JWKSetInterface
$allowed_algorithms array
$signature_index null | integer
return Jose\Object\JWSInterface If the data has been loaded.

loadAndVerifySignatureUsingKeySetAndDetachedPayload() public method

public loadAndVerifySignatureUsingKeySetAndDetachedPayload ( string $input, Jose\Object\JWKSetInterface $jwk_set, array $allowed_algorithms, string $detached_payload, null | integer &$signature_index = null ) : Jose\Object\JWSInterface
$input string
$jwk_set Jose\Object\JWKSetInterface
$allowed_algorithms array
$detached_payload string
$signature_index null | integer
return Jose\Object\JWSInterface If the data has been loaded.