3 declare(strict_types=1);
29 require_once(
"Services/Init/classes/class.ilInitialisation.php");
44 if (strtoupper(
$DIC->http()->request()->getMethod()) !==
"POST") {
51 if (!
$post->has(
'client_assertion') || !
$post->has(
'client_assertion_type') || !
$post->has(
'grant_type') || !
$post->has(
'scope')) {
117 $keyset = json_decode($jwks,
true);
118 $keys = JWK::parseKeySet($keyset);
136 "exp" => $now + 3600,
137 "imsglobal.org.security.scope" =>
$scopes 143 'access_token' => $accessToken,
144 'token_type' =>
'baerer',
145 'expires_in' => 3600,
if(!empty(ilObjLTIConsumer::verifyPrivateKey())) if(strtoupper($DIC->http() ->request() ->getMethod()) !=="POST") $params
if($clientAssertionType !='urn:ietf:params:oauth:client-assertion-type:jwt-bearer'|| $grantType !='client_credentials') $parts
static sendResponseError(int $code, string $message, $log=true)
if(count($parts) !=3) $payload
static verifyPrivateKey()
if(empty($clientId)) $providerId
validateServiceToken(string $token, ilLTIConsumeProvider $provider)
static getProviderIdFromClientId(string $clientId)
serverError(string $log="")
if($claims==null) $clientId
static initILIAS()
ilias initialisation
if(! $post->has('client_assertion')||! $post->has('client_assertion_type')||! $post->has('grant_type')||! $post->has('scope')) $clientAssertion
invalidRequest(string $log="")
static init(string $a_type)
Init context by type.
static sendResponseJson(array $obj)
sendAccessToken(string $scopes, ilLTIConsumeProvider $provider)