forked from omniauth/omniauth_openid_connect
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support
response_type: ["code", "id_token"]
Closes [omniauth#105][] Similar to [omniauth#107][] Some OpenID compatible IdP support hybrid authorizations that accept a `response_type` with both `code` and `id_token`. For example, [Microsoft Azure B2C][] accepts them as a URL-encoded array: > `response_type`: Must include an ID token for OpenID Connect. If your web application also needs tokens for calling a web API, you can use `code+id_token`. This commit extends the `OmniAuth::Strategies::OpenIDConnect` to encode the `response_type` into the query parameter as space-delimited token list when provided as an array. Similarly, when checking for missing keys in the response, iterate over the values as if they're an array. For the originally supported single-value case, the previous behavior is maintained. [Microsoft Azure B2C]: https://learn.microsoft.com/en-us/azure/active-directory-b2c/openid-connect#send-authentication-requests [omniauth#105]: omniauth#105 [omniauth#107]: omniauth#107
- Loading branch information
1 parent
4e16f70
commit 09af6dc
Showing
3 changed files
with
55 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters