PHP Interface Jose\LoaderInterface

Afficher le fichier Open project: spomky-labs/jose Interface Usage Examples

Méthodes publiques

Méthode 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 méthode

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
Résultat Jose\Object\JWSInterface | Jose\Object\JWEInterface If the data has been loaded.

loadAndDecryptUsingKey() public méthode

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
Résultat Jose\Object\JWSInterface | Jose\Object\JWEInterface If the data has been loaded.

loadAndDecryptUsingKeySet() public méthode

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
Résultat Jose\Object\JWEInterface If the data has been loaded.

loadAndVerifySignatureUsingKey() public méthode

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
Résultat Jose\Object\JWSInterface If the data has been loaded.

loadAndVerifySignatureUsingKeyAndDetachedPayload() public méthode

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
Résultat Jose\Object\JWSInterface If the data has been loaded.

loadAndVerifySignatureUsingKeySet() public méthode

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
Résultat Jose\Object\JWSInterface If the data has been loaded.

loadAndVerifySignatureUsingKeySetAndDetachedPayload() public méthode

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
Résultat Jose\Object\JWSInterface If the data has been loaded.