You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not possible to inject custom implementation of EncryptionInterface without overriding whole createDefaultIdTokenResponseType() or whole response type
#1056
Open
A-Shevchenko opened this issue
Nov 22, 2023
· 0 comments
Let's imagine we want to have custom implementation of EncryptionInterface, e.g. because we want to add custom header info. It's the instruction directly in the code BTW:
/**
* Override to create a custom header
*/
protected function generateJwtHeader($payload, $algorithm)
{
return array(
'typ' => 'JWT',
'alg' => $algorithm,
);
}
So, we create a custom implementation, but there is no way to pass it to instantiation of IdToken class, because it doesn't accept anything as last parameter here: return new IdToken($this->storages['user_claims'], $this->storages['public_key'], $config); (in createDefaultIdTokenResponseType()).
So to solve that we need to create a custom implementation of createDefaultIdTokenResponseType() or whole response type
The text was updated successfully, but these errors were encountered:
Let's imagine we want to have custom implementation of EncryptionInterface, e.g. because we want to add custom header info. It's the instruction directly in the code BTW:
So, we create a custom implementation, but there is no way to pass it to instantiation of
IdToken
class, because it doesn't accept anything as last parameter here:return new IdToken($this->storages['user_claims'], $this->storages['public_key'], $config);
(increateDefaultIdTokenResponseType()
).So to solve that we need to create a custom implementation of createDefaultIdTokenResponseType() or whole response type
The text was updated successfully, but these errors were encountered: