ILIAS
release_8 Revision v8.24
◀ ilDoc Overview
ClientInterface.php
Go to the documentation of this file.
1
<?php
2
19
namespace
ILIAS\LTI\ToolProvider\Jwt
;
20
28
interface
ClientInterface
29
{
35
public
static
function
getSupportedAlgorithms
(): array;
36
42
public
function
hasJwt
(): bool;
43
49
public
function
isEncrypted
(): bool;
50
57
public
function
load
(
string
$jwtString,
string
$privateKey
=
null
): bool;
58
64
public
function
getJweHeaders
(): array;
65
71
public
function
hasHeader
(
string
$name
): bool;
72
79
public
function
getHeader
(
string
$name
,
string
$defaultValue =
null
): string;
80
86
public
function
getHeaders
(): array;
87
93
public
static
function
getLastHeaders
(): array;
94
100
public
function
hasClaim
(
string
$name
): bool;
101
108
public
function
getClaim
(
string
$name
,
string
$defaultValue =
null
);
109
115
public
function
getPayload
(): array;
116
122
public
static
function
getLastPayload
(): array;
123
130
public
function
verify
(
string
$publicKey,
string
$jku
=
null
): bool;
131
143
public
static
function
sign
(
144
array
$payload
,
145
string
$signatureMethod
,
146
string
$privateKey
,
147
string
$kid
=
null
,
148
string
$jku
=
null
,
149
string
$encryptionMethod
=
null
,
150
string
$publicKey =
null
151
): string;
152
158
public
static
function
generateKey
(
string
$signatureMethod
=
'RS256'
): ?string;
159
165
public
static
function
getPublicKey
(
string
$privateKey
): string;
166
174
public
static
function
getJWKS
(
string
$pemKey,
string
$signatureMethod
,
string
$kid
): array;
175
}
ILIAS\LTI\ToolProvider\Jwt\ClientInterface
Interface to represent an HWT client.
Definition:
ClientInterface.php:29
ILIAS\LTI\ToolProvider\Jwt\ClientInterface\sign
static sign(array $payload, string $signatureMethod, string $privateKey, string $kid=null, string $jku=null, string $encryptionMethod=null, string $publicKey=null)
Sign the JWT.
ILIAS\LTI\ToolProvider\Jwt\ClientInterface\hasJwt
hasJwt()
Check if a JWT is defined.
ILIAS\LTI\ToolProvider\Jwt\ClientInterface\verify
verify(string $publicKey, string $jku=null)
Verify the signature of the JWT.
ILIAS\LTI\ToolProvider\Jwt\ClientInterface\getJWKS
static getJWKS(string $pemKey, string $signatureMethod, string $kid)
Get the public JWKS from a key in PEM format.
ILIAS\LTI\ToolProvider\Jwt\ClientInterface\getPublicKey
static getPublicKey(string $privateKey)
Get the public key for a private key.
ILIAS\LTI\ToolProvider\Jwt\ClientInterface\getSupportedAlgorithms
static getSupportedAlgorithms()
Return an array of supported signature algorithms.
ILIAS\LTI\ToolProvider\Jwt\ClientInterface\getJweHeaders
getJweHeaders()
Get the value of the JWE headers.
ILIAS\LTI\ToolProvider\Jwt\ClientInterface\hasClaim
hasClaim(string $name)
Check whether a JWT has a claim with the specified name.
ILIAS\LTI\ToolProvider\Jwt\ClientInterface\load
load(string $jwtString, string $privateKey=null)
Load a JWT from a string.
ILIAS\LTI\ToolProvider\Jwt\ClientInterface\getClaim
getClaim(string $name, string $defaultValue=null)
Get the value of the claim with the specified name.
ILIAS\LTI\ToolProvider\Jwt\ClientInterface\isEncrypted
isEncrypted()
Check if a JWT's content is encrypted.
ILIAS\LTI\ToolProvider\Jwt\ClientInterface\hasHeader
hasHeader(string $name)
Check whether a JWT has a header with the specified name.
ILIAS\LTI\ToolProvider\Jwt\ClientInterface\getLastPayload
static getLastPayload()
Get the value of the payload for the last signed JWT (before any encryption).
ILIAS\LTI\ToolProvider\Jwt\ClientInterface\getLastHeaders
static getLastHeaders()
Get the value of the headers for the last signed JWT (before any encryption).
ILIAS\LTI\ToolProvider\Jwt\ClientInterface\getHeader
getHeader(string $name, string $defaultValue=null)
Get the value of the header with the specified name.
ILIAS\LTI\ToolProvider\Jwt\ClientInterface\getPayload
getPayload()
Get the value of the payload.
ILIAS\LTI\ToolProvider\Jwt\ClientInterface\getHeaders
getHeaders()
Get the value of the headers.
ILIAS\LTI\ToolProvider\Jwt\ClientInterface\generateKey
static generateKey(string $signatureMethod='RS256')
Generate a new private key in PEM format.
$privateKey
$privateKey
Definition:
ltiregstart.php:68
$payload
if(count($parts) !=3) $payload
Definition:
ltitoken.php:70
$name
if($format !==null) $name
Definition:
metadata.php:247
ILIAS\LTI\ToolProvider\Jwt
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition:
ClientInterface.php:19
ILIAS\LTI\ToolProvider\$encryptionMethod
string $encryptionMethod
Algorithm used for encrypting messages.
Definition:
System.php:57
ILIAS\LTI\ToolProvider\$jku
string $jku
Endpoint for public key.
Definition:
System.php:95
ILIAS\LTI\ToolProvider\$kid
string $kid
Key ID.
Definition:
System.php:88
ILIAS\LTI\ToolProvider\$signatureMethod
string $signatureMethod
Method used for signing messages.
Definition:
System.php:50
Services
LTI
src
ToolProvider
Jwt
ClientInterface.php
Generated on Sun Nov 2 2025 22:01:39 for ILIAS by
1.9.4 (using
Doxyfile
)