This class exposes functions for LTI 1.3 Key Management.
More...
|
static | fix_jwks_alg (array $jwks, string $jwt) |
| Take an array of JWKS keys and infer the 'alg' property for a single key, if missing, based on an input JWT.
|
|
static | get_jwks () |
| Returns the JWK Key Set for this site.
|
|
static | get_private_key () |
| Returns the private key to use to sign outgoing JWT.
|
|
This class exposes functions for LTI 1.3 Key Management.
- Copyright
- 2020 Claude Vervoort (Cengage)
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ fix_jwks_alg()
static mod_lti\local\ltiopenid\jwks_helper::fix_jwks_alg |
( |
array | $jwks, |
|
|
string | $jwt ) |
|
static |
Take an array of JWKS keys and infer the 'alg' property for a single key, if missing, based on an input JWT.
This only sets the 'alg' property for a single key when all the following conditions are met:
- The key's 'kid' matches the 'kid' provided in the JWT's header.
- The key's 'alg' is missing.
- The JWT's header 'alg' matches the algorithm family of the key (the key's kty).
- The JWT's header 'alg' matches one of the approved LTI asymmetric algorithms.
Keys not matching the above are left unchanged.
- Parameters
-
array | $jwks | the keyset array. |
string | $jwt | the JWT string. |
- Return values
-
array | the fixed keyset array. |
◆ get_jwks()
static mod_lti\local\ltiopenid\jwks_helper::get_jwks |
( |
| ) |
|
|
static |
Returns the JWK Key Set for this site.
- Return values
-
array | keyset exposting the site public key. |
◆ get_private_key()
static mod_lti\local\ltiopenid\jwks_helper::get_private_key |
( |
| ) |
|
|
static |
Returns the private key to use to sign outgoing JWT.
- Return values
-
array | keys are kid and key in PEM format. |
The documentation for this class was generated from the following file:
- mod/lti/classes/local/ltiopenid/jwks_helper.php