MarcelCoding / jitsi-openid

Jitsi OpenID is an authentication adapter that allows Jitsi to authorize users with OpenID Connect.
GNU Affero General Public License v3.0
31 stars 4 forks source link

Add support for token_affiliation #114

Closed DanielMalmgren closed 2 years ago

DanielMalmgren commented 2 years ago

I will be needing support for token affiliation in my jwt's. It would mean that if the incoming openid token contains an attribute named "affiliation" I would simply need jitsi-openid to put it in the jwt sent to Jitsi. That would be an easy fix, right?

DanielMalmgren commented 2 years ago

I created a pr for this: #115

DanielMalmgren commented 2 years ago

No, I'm sorry, but I think we broke it completely now... I get the following error whatever I try to do:

Missing request extension: Extension of type openidconnect::Client<openidconnect::claims::EmptyAdditionalClaims, openidconnect::core::CoreAuthDisplay, openidconnect::core::CoreGenderClaim, openidconnect::core::CoreJweContentEncryptionAlgorithm, openidconnect::core::CoreJwsSigningAlgorithm, openidconnect::core::jwk::CoreJsonWebKeyType, openidconnect::core::jwk::CoreJsonWebKeyUse, openidconnect::core::jwk::CoreJsonWebKey, openidconnect::core::CoreAuthPrompt, oauth2::StandardErrorResponse<oauth2::basic::BasicErrorResponseType>, oauth2::StandardTokenResponse<openidconnect::id_token::IdTokenFields<openidconnect::claims::EmptyAdditionalClaims, oauth2::EmptyExtraTokenFields, openidconnect::core::CoreGenderClaim, openidconnect::core::CoreJweContentEncryptionAlgorithm, openidconnect::core::CoreJwsSigningAlgorithm, openidconnect::core::jwk::CoreJsonWebKeyType>, oauth2::basic::BasicTokenType>, oauth2::basic::BasicTokenType, oauth2::StandardTokenIntrospectionResponse<oauth2::EmptyExtraTokenFields, oauth2::basic::BasicTokenType>, oauth2::revocation::StandardRevocableToken, oauth2::StandardErrorResponse<oauth2::revocation::RevocationErrorResponseType>> was not found. Perhaps you forgot to add it? See axum::Extension.

MarcelCoding commented 2 years ago

Sorry my bad, fixed in https://github.com/MarcelCoding/jitsi-openid/commit/29747a75ef0bd93b5ff8db4dc77fcee05981e954.

DanielMalmgren commented 2 years ago

fixed in 29747a7

Works like a charm now! Thanks a lot!