19 declare(strict_types=1);
41 if (strtoupper(
$DIC->http()->request()->getMethod()) !==
"POST") {
48 if (!
$post->has(
'client_assertion') || !
$post->has(
'client_assertion_type') || !
$post->has(
'grant_type') || !
$post->has(
'scope')) {
114 $keyset = json_decode($jwks,
true);
115 $keys = JWK::parseKeySet($keyset);
116 $data = JWT::decode($token, $keys);
133 "exp" => $now + 3600,
134 "imsglobal.org.security.scope" =>
$scopes 140 'access_token' => $accessToken,
141 'token_type' =>
'baerer',
142 'expires_in' => 3600,
if(!empty(ilObjLTIConsumer::verifyPrivateKey())) if(strtoupper($DIC->http() ->request() ->getMethod()) !=="POST") $params
Indicates general problems with the input or output operations.
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)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
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)