HumHub Documentation (unofficial)

JWSLoader
in package

Table of Contents

Properties

$headerCheckerManager  : null|HeaderCheckerManager
$jwsVerifier  : JWSVerifier
$serializerManager  : JWSSerializerManager

Methods

__construct()  : mixed
JWSLoader constructor.
getHeaderCheckerManager()  : HeaderCheckerManager|null
Returns the Header Checker Manager associated to the JWSLoader.
getJwsVerifier()  : JWSVerifier
Returns the JWSVerifier associated to the JWSLoader.
getSerializerManager()  : JWSSerializerManager
Returns the JWSSerializer associated to the JWSLoader.
loadAndVerifyWithKey()  : JWS
This method will try to load and verify the token using the given key.
loadAndVerifyWithKeySet()  : JWS
This method will try to load and verify the token using the given key set.
processSignature()  : bool

Properties

Methods

loadAndVerifyWithKey()

This method will try to load and verify the token using the given key.

public loadAndVerifyWithKey(string $token, JWK $key, int|null &$signature[, string|null $payload = null ]) : JWS

It returns a JWS and will populate the $signature variable in case of success, otherwise an exception is thrown.

Parameters
$token : string
$key : JWK
$signature : int|null
$payload : string|null = null
Tags
throws
Exception

if the token cannot be loaded or verified

Return values
JWS

loadAndVerifyWithKeySet()

This method will try to load and verify the token using the given key set.

public loadAndVerifyWithKeySet(string $token, JWKSet $keyset, int|null &$signature[, string|null $payload = null ]) : JWS

It returns a JWS and will populate the $signature variable in case of success, otherwise an exception is thrown.

Parameters
$token : string
$keyset : JWKSet
$signature : int|null
$payload : string|null = null
Tags
throws
Exception

if the token cannot be loaded or verified

Return values
JWS

processSignature()

private processSignature(JWS $jws, JWKSet $keyset, int $signature, string|null $payload) : bool
Parameters
$jws : JWS
$keyset : JWKSet
$signature : int
$payload : string|null
Return values
bool

        
On this page

Search results