LTI Integration Library 4.10.3
PHP class library for building LTI integrations
 
Loading...
Searching...
No Matches
Jwt/ClientInterface.php
1<?php
2
3namespace ceLTIc\LTI\Jwt;
4
13{
14
20 public static function getSupportedAlgorithms();
21
27 public function hasJwt();
28
34 public function isEncrypted();
35
44 public function load($jwtString, $privateKey = null);
45
51 public function getJweHeaders();
52
60 public function hasHeader($name);
61
70 public function getHeader($name, $defaultValue = null);
71
77 public function getHeaders();
78
84 public static function getLastHeaders();
85
93 public function hasClaim($name);
94
103 public function getClaim($name, $defaultValue = null);
104
110 public function getPayload();
111
117 public static function getLastPayload();
118
127 public function verify($publicKey, $jku = null);
128
142 public static function sign($payload, $signatureMethod, $privateKey, $kid = null, $jku = null, $encryptionMethod = null,
143 $publicKey = null);
144
152 public static function generateKey($signatureMethod = 'RS256');
153
161 public static function getPublicKey($privateKey);
162
172 public static function getJWKS($pemKey, $signatureMethod, $kid);
173}
Class to represent an HTTP message request.
Definition Jwt.php:15
Interface to represent an HWT client.
static getLastHeaders()
Get the value of the headers for the last signed JWT (before any encryption).
static getLastPayload()
Get the value of the payload for the last signed JWT (before any encryption).
getHeaders()
Get the value of the headers.
static getJWKS($pemKey, $signatureMethod, $kid)
Get the public JWKS from a key in PEM format.
hasJwt()
Check if a JWT is defined.
getJweHeaders()
Get the value of the JWE headers.
static getPublicKey($privateKey)
Get the public key for a private key.
load($jwtString, $privateKey=null)
Load a JWT from a string.
static generateKey($signatureMethod='RS256')
Generate a new private key in PEM format.
isEncrypted()
Check if a JWT's content is encrypted.
static getSupportedAlgorithms()
Return an array of supported signature algorithms.
getHeader($name, $defaultValue=null)
Get the value of the header with the specified name.
getClaim($name, $defaultValue=null)
Get the value of the claim with the specified name.
static sign($payload, $signatureMethod, $privateKey, $kid=null, $jku=null, $encryptionMethod=null, $publicKey=null)
Sign the JWT.
hasHeader($name)
Check whether a JWT has a header with the specified name.
getPayload()
Get the value of the payload.
hasClaim($name)
Check whether a JWT has a claim with the specified name.
verify($publicKey, $jku=null)
Verify the signature of the JWT.