366 Commits

Author SHA1 Message Date
Marc Alvarez
b4dca67d3c fix: consistently handle string-valued boolean fields from non-compliant OIDC providers (#791)
AWS Cognito (and potentially other providers) return `email_verified`
and `phone_number_verified` as strings (`"true"`/`"false"`) instead of
proper JSON booleans, violating the [OIDC
specification](https://openid.net/specs/openid-connect-basic-1_0.html#StandardClaims).

AWS Documentation confirms this:
> Currently, Amazon Cognito returns the values for email_verified and
phone_number_verified as strings.

_Source:
https://docs.aws.amazon.com/cognito/latest/developerguide/userinfo-endpoint.html#get-userinfo-response-sample_

### The Problem

The `zitadel/oidc` library currently handles this inconsistently:
  -  `EmailVerified` uses the custom `Bool` type (added in #139)
  -  `PhoneNumberVerified` uses Go's standard `bool`
  
This forces developers to handle semantically identical fields
differently:

```go
// Currently inconsistent code path
userInfo.EmailVerified = oidc.Bool(emailValue)    // Cast
userInfo.PhoneNumberVerified = phoneValue      // No cast
```

Additionally, the existing `Bool.UnmarshalJSON` implementation meant
that false values couldn't overwrite true.

### Solution

Applied `Bool` type consistently to both fields and simplified
`Bool.UnmarshalJSON` using a direct switch statement to:

  - Handle standard JSON booleans (true/false)
  - Handle AWS Cognito string format ("true"/"false")
  - Return errors on invalid input instead of silently failing
  - Allow false to overwrite true

 Updated tests to match codebase conventions, as well.

 ### Impact

`PhoneNumberVerified` changes from `bool` to `Bool` (type alias of
`bool`). Most consumer code should work as-is since `Bool` is just a
type alias. Direct type assertions would need updating.

### Definition of Ready

- [X] I am happy with the code
- [X] Short description of the feature/issue is added in the pr
description
- [ ] PR is linked to the corresponding user story
- [X] Acceptance criteria are met
- [ ] All open todos and follow ups are defined in a new ticket and
justified
- [ ] Deviations from the acceptance criteria and design are agreed with
the PO and documented.
- [X] No debug or dead code
- [X] My code has no repetitions
- [X] Critical parts are tested automatically
- [x] Where possible E2E tests are implemented
- [X] Documentation/examples are up-to-date
- [ ] All non-functional requirements are met
- [x] Functionality of the acceptance criteria is checked manually on
the dev system.

Co-authored-by: Wim Van Laer <wim07101993@users.noreply.github.com>
2026-01-12 09:33:18 +00:00
Jacques Dafflon
a3f34289fa fix(rp): don't ignore JWKS parsing errors (#771)
This safely ignores unknown key type errors on JWKS while returning all
other errors. Returned errors are wrap to easily identify which key in
the set is problematic if any.

Jose v4.0.3 was handling this correctly according to spec, but it was
reverted in v4.0.4 as the implementation was a breaking change due to
the custom UnmarshalJSON on the key set. For details see:
- https://github.com/go-jose/go-jose/issues/136
- https://github.com/go-jose/go-jose/pull/137

Jose v4.0.4 also provided a handy static error to check for unknown web
key types. Sadly this was removed: a prefix match on the error message
is the best option until Jose improves it's error handling.

Hopefully, Jose will not change the error message in a patch or minor
version release. But just in case, test cases have been added to detect
it.

Closes #541

### Definition of Ready

- [x] I am happy with the code
- [x] Short description of the feature/issue is added in the pr
description
- [x] PR is linked to the corresponding user story
- [ ] Acceptance criteria are met
- [ ] All open todos and follow ups are defined in a new ticket and
justified
- [ ] Deviations from the acceptance criteria and design are agreed with
the PO and documented.
- [x] No debug or dead code
- [x] My code has no repetitions
- [x] Critical parts are tested automatically
- [x] Where possible E2E tests are implemented
- [x] Documentation/examples are up-to-date
- [x] All non-functional requirements are met
- [ ] Functionality of the acceptance criteria is checked manually on
the dev system.

Co-authored-by: Wim Van Laer <wim07101993@users.noreply.github.com>
2025-12-03 11:46:51 +01:00
Jacques Dafflon
e3169b695f feat(rp): add WithPKCEFromDisocvery (#776)
Add the WithPKCEFromDiscovery option to create a relying party with PKCE
enabled if it is supported when query the discovery endpoint as
discussed in #506.

This only works when creating an OIDC RP which performs a discovery
call. With an OAuth2-only RP, an error is returned as no discovery call
is performed.

Closes #506

### Definition of Ready

- [x] I am happy with the code
- [x] Short description of the feature/issue is added in the pr
description
- [x] PR is linked to the corresponding user story
- [ ] Acceptance criteria are met
- [ ] All open todos and follow ups are defined in a new ticket and
justified
- [ ] Deviations from the acceptance criteria and design are agreed with
the PO and documented.
- [x] No debug or dead code
- [x] My code has no repetitions
- [x] Critical parts are tested automatically
- [x] Where possible E2E tests are implemented
- [x] Documentation/examples are up-to-date
- [x] All non-functional requirements are met
- [ ] Functionality of the acceptance criteria is checked manually on
the dev system.
2025-09-29 08:42:54 +00:00
Livio Spring
adddf0e4b3 refactor: deprecate proprietary key file use for JWT Profile (#801)
While reviewing #750, we noticed that the `KeyFile` struct and
corresponding methods are proprietary to Zitadel and should have never
been part of the pure OIDC library.

This PR deprecates the corresponding parts. For users of Zitadel, the
corresponding code is moved to zitadel/zitadel-go#516

### Definition of Ready

- [x] I am happy with the code
- [x] Short description of the feature/issue is added in the pr
description
- [x] PR is linked to the corresponding user story
- [x] Acceptance criteria are met
- [ ] All open todos and follow ups are defined in a new ticket and
justified
- [ ] Deviations from the acceptance criteria and design are agreed with
the PO and documented.
- [x] No debug or dead code
- [x] My code has no repetitions
- [x] Critical parts are tested automatically
- [ ] Where possible E2E tests are implemented
- [x] Documentation/examples are up-to-date
- [x] All non-functional requirements are met
- [x] Functionality of the acceptance criteria is checked manually on
the dev system.
2025-09-23 08:44:48 +02:00
Tim Möhlmann
c85da539c0 chore(go): add support for 1.25 (#798)
- Add Go 1.25 to the test matrix
- Oldest supported Go version is now 1.24, as required for
https://github.com/zitadel/oidc/pull/796
- Fix non-constant format string build errors

### Definition of Ready

- [x] I am happy with the code
- [x] Short description of the feature/issue is added in the pr
description
- [x] PR is linked to the corresponding user story
- [x] Acceptance criteria are met
- [x] All open todos and follow ups are defined in a new ticket and
justified
- [x] Deviations from the acceptance criteria and design are agreed with
the PO and documented.
- [x] No debug or dead code
- [x] My code has no repetitions
- [x] Critical parts are tested automatically
- [x] Where possible E2E tests are implemented
- [x] Documentation/examples are up-to-date
- [x] All non-functional requirements are met
- [x] Functionality of the acceptance criteria is checked manually on
the dev system.
2025-09-08 12:05:27 +03:00
Ayato
5d37097a96 chore(op): fix parameter name typo in GetKeyByIDAndClientID (#779)
Fix parameter name typo in `GetKeyByIDAndClientID`

### Definition of Ready
- [x] I am happy with the code
- [x] Short description of the feature/issue is added in the pr
description
- [ ] PR is linked to the corresponding user story
- [ ] Acceptance criteria are met
- [ ] All open todos and follow ups are defined in a new ticket and
justified
- [ ] Deviations from the acceptance criteria and design are agreed with
the PO and documented.
- [ ] No debug or dead code
- [ ] My code has no repetitions
- [ ] Critical parts are tested automatically
- [ ] Where possible E2E tests are implemented
- [ ] Documentation/examples are up-to-date
- [ ] All non-functional requirements are met
- [ ] Functionality of the acceptance criteria is checked manually on
the dev system.

Co-authored-by: Stefan Benz <46600784+stebenz@users.noreply.github.com>
2025-08-05 12:25:17 +00:00
mqf20
3edc81ed9a feat: allow setting op.Crypto during provider setup (#778)
Add a `op.WithCrypto` `op.Option` that allows developers to specify
their custom `op.Crypto` implementations during setup. If the
`op.Option` is used, it will override `op.Config.CryptoKey`.

Closes https://github.com/zitadel/oidc/issues/736.

### Definition of Ready

- [x] I am happy with the code
- [x] Short description of the feature/issue is added in the pr
description
- [x] PR is linked to the corresponding user story
- [ ] Acceptance criteria are met
- [ ] All open todos and follow ups are defined in a new ticket and
justified
- [ ] Deviations from the acceptance criteria and design are agreed with
the PO and documented.
- [x] No debug or dead code
- [ ] My code has no repetitions
- [ ] Critical parts are tested automatically
- [ ] Where possible E2E tests are implemented
- [x] Documentation/examples are up-to-date
- [ ] All non-functional requirements are met
- [ ] Functionality of the acceptance criteria is checked manually on
the dev system.

---------

Signed-off-by: mqf20 <mingqingfoo@gmail.com>
Co-authored-by: Tim Möhlmann <tim+github@zitadel.com>
2025-08-05 12:00:11 +00:00
Sianao
1fb34f3d41 fix: add redirect_uri decoded (#775)
### Definition of Ready

This PR introduces a redirect_uri decoding step (url.QueryUnescape) in
the authorization request validation logic.
Libraries such as
[golang.org/x/oauth2](https://cs.opensource.google/go/x/oauth2/+/refs/tags/v0.30.0:oauth2.go;l=184)
automatically encode the redirect_uri using url.Values.Encode(). This
means the incoming URI is percent-encoded (e.g.,
https%3A%2F%2Fclient.example.com%2Fcallback), and the server must decode
it before performing string comparisons.

- [x] I am happy with the code
- [x] Short description of the feature/issue is added in the pr
description
- [x] PR is linked to the corresponding user story
- [x] Acceptance criteria are met
- [x] All open todos and follow ups are defined in a new ticket and
justified
- [x] Deviations from the acceptance criteria and design are agreed with
the PO and documented.
- [x] No debug or dead code
- [x] My code has no repetitions
- [x] Critical parts are tested automatically
- [x] Where possible E2E tests are implemented
- [x] Documentation/examples are up-to-date
- [x] All non-functional requirements are met
- [x] Functionality of the acceptance criteria is checked manually on
the dev system.

Co-authored-by: sianao <me@sianao.site>
2025-08-04 11:48:51 +00:00
Marc Alvarez
baf65b9a8c chore(op): clarify refresh token parameter names and improve code readability (#756)
### Context

While implementing the Storage interface, I discovered that several
parameter names were misleading:
- Parameters named `refreshTokenID` and `newRefreshTokenID` actually
contain the full token values, not IDs
- This naming inconsistency caused confusion about what values should be
passed/returned
- The example implementations already use the semantically correct names
(`refreshToken`, `newRefreshToken`), creating a mismatch with the
interface definition

  ## Solution

This PR aligns the interface parameter names with their actual purpose
and with the existing example implementations.

  ## Changes

  1. **Storage interface parameter renames:**
     - `TokenRequestByRefreshToken`: `refreshTokenID` → `refreshToken`
- `CreateAccessAndRefreshTokens`: `newRefreshTokenID` →
`newRefreshToken`

  2. **Improved code readability in token.go:**
     - Made bare returns explicit for better clarity
     - Added documentation explaining the token creation flow
     - Clarified why `CreateAccessToken` also returns refresh tokens

  ## Impact

- **Breaking change**: No - these are parameter name changes in the
interface definition only
  - **Behavior change**: No - all logic remains unchanged
- **Documentation**: Improved with clearer parameter names and added
explanations

  ## Testing

- Ran existing tests (some timing-related test failures are pre-existing
and unrelated to these changes)
  - Verified example implementations already use the new parameter names

### Definition of Ready

- [X] I am happy with the code
- [X] Short description of the feature/issue is added in the pr
description
- [ ] PR is linked to the corresponding user story
- [ ] Acceptance criteria are met
- [ ] All open todos and follow ups are defined in a new ticket and
justified
- [ ] Deviations from the acceptance criteria and design are agreed with
the PO and documented.
- [X] No debug or dead code
- [X] My code has no repetitions
- [ ] Critical parts are tested automatically
- [ ] Where possible E2E tests are implemented
- [X] Documentation/examples are up-to-date
- [ ] All non-functional requirements are met
- [ ] Functionality of the acceptance criteria is checked manually on
the dev system.
2025-08-04 14:13:11 +03:00
Brian Joerger
0d50c9369e feat(rp): optional authorized party check (#752)
This PR makes the default Authorized Party check in `rp.VerifyIDToken`
optional by adding an options parameter for dynamic verification
functions. This check is meant to be an optional validation requirement,
so some providers (including GCP) do not adhere to it.

See https://github.com/zitadel/oidc/issues/405 for more context.

Closes https://github.com/zitadel/oidc/issues/405
2025-07-31 08:36:27 +00:00
Marco A.
dbf1a731a9 feat: pass optional logout hint and ui locales to end session request (#774)
### Definition of Ready

- [x] I am happy with the code
- [x] Short description of the feature/issue is added in the pr
description
- [x] PR is linked to the corresponding user story
- [x] Acceptance criteria are met
- [x] All open todos and follow ups are defined in a new ticket and
justified
- [x] Deviations from the acceptance criteria and design are agreed with
the PO and documented.
- [x] No debug or dead code
- [x] My code has no repetitions
- [x] Critical parts are tested automatically
- [x] Where possible E2E tests are implemented
- [x] Documentation/examples are up-to-date
- [x] All non-functional requirements are met
- [x] Functionality of the acceptance criteria is checked manually on
the dev system.

# Context

PR https://github.com/zitadel/oidc/pull/754 has introduced the optional
logout hint and UI locales to the end session request. However, while
working on https://github.com/zitadel/zitadel/pull/10039 , I have
noticed that the integration tests on Zitadel side call
`relying_party.EndSession()` without the possibility of specifying any
logout hint nor ui locales.

This PR adds these 2 parameters to `relying_party.EndSession()`
function.
2025-07-24 21:26:46 +02:00
Mark Laing
c0d0ba9b0f feat: Request aware cookie handling (#753)
* pkg/http: Add `secureCookieFunc` field to CookieHandler.

Signed-off-by: Mark Laing <mark.laing@canonical.com>

* pkg/http: Add `IsRequestAware` method CookieHandler.

Signed-off-by: Mark Laing <mark.laing@canonical.com>

* pkg/http: Use `secureCookieFunc` when checking a cookie (if set).

Signed-off-by: Mark Laing <mark.laing@canonical.com>

* pkg/http: Error on `SetCookie` if cookie handler is request aware.

Signed-off-by: Mark Laing <mark.laing@canonical.com>

* pkg/http: Add method to set request aware cookies.

Signed-off-by: Mark Laing <mark.laing@canonical.com>

* pkg/http: Add function to create a new request aware cookie handler.

Signed-off-by: Mark Laing <mark.laing@canonical.com>

* pkg/client/rp: Update `trySetStateCookie` function signature.

Use `SetRequestAwareCookie` if the cookie handle is request aware.
This function signature can be updated because it is not exported.

Signed-off-by: Mark Laing <mark.laing@canonical.com>

* pkg/client/rp: Add `GenerateAndStoreCodeChallengeWithRequest` function.

It's not possible to add a `http.Request` argument to
`GenerateAndStoreCodeChallenge` as this would be a breaking change.
Instead, add a new function that accepts a request argument and call
`SetRequestAwareCookie` here.

Signed-off-by: Mark Laing <mark.laing@canonical.com>

* pkg/client/rp: Update PKCE logic to pass request if required by cookie handler.

Signed-off-by: Mark Laing <mark.laing@canonical.com>

* pkg/http: Don't set MaxAge if cookie handler is request aware.

The securecookie field can be nil. Expect the caller to set max age on
the securecookie returned by the secureCookieFunc.

Signed-off-by: Mark Laing <mark.laing@canonical.com>

* pkg/client: Add integration tests for request aware cookie handling.

Adds a new type `cookieSpec` which is accepted as an argument to
`RunAuthorizationCodeFlow`. `TestRelyingPartySession` now runs with
`wrapServer` true/false and with two cookie handlers, one static and one
request aware.

The request aware handler extracts encryption keys from a secret using a
salt from a "login_id" cookie.

Signed-off-by: Mark Laing <mark.laing@canonical.com>

---------

Signed-off-by: Mark Laing <mark.laing@canonical.com>
2025-07-16 11:33:03 +00:00
Jan-Otto Kröpke
21e830e275 feat: exclude OTEL instrumentation via build tag (#770)
* feat: exclude OTEL instrumentation via build tag

* add readme
2025-07-16 11:29:59 +00:00
Jonathan Yoder
71b7500c62 fix: Omit empty assertion fields in client creds request (#745) 2025-07-02 12:34:13 +00:00
Livio Spring
f94bd541d7 feat: update end session request to pass all params according to specification (#754)
* feat: update end session request to pass all params according to specification

* register encoder
2025-06-05 13:19:51 +02:00
Ayato
4f0ed79c0a fix(op): Add mitigation for PKCE Downgrade Attack (#741)
* fix(op): Add mitigation for PKCE downgrade attack

* chore(op): add test for PKCE verification
2025-04-29 14:33:31 +00:00
Masahito Osako
5913c5a074 feat: enhance authentication response handling (#728)
- Introduced CodeResponseType struct to encapsulate response data.
- Added handleFormPostResponse and handleRedirectResponse functions to manage different response modes.
- Created BuildAuthResponseCodeResponsePayload and BuildAuthResponseCallbackURL functions for better modularity in response generation.
2025-04-29 14:17:28 +00:00
Ayato
c51628ea27 feat(op): always verify code challenge when available (#721)
Finally the RFC Best Current Practice for OAuth 2.0 Security has been approved.

According to the RFC:

> Authorization servers MUST support PKCE [RFC7636].
> 
> If a client sends a valid PKCE code_challenge parameter in the authorization request, the authorization server MUST enforce the correct usage of code_verifier at the token endpoint.

Isn’t it time we strengthen PKCE support a bit more?

This PR updates the logic so that PKCE is always verified, even when the Auth Method is not "none".
2025-03-24 18:00:04 +02:00
Iraq
2c64de821d chore: updating go to 1.24 (#726)
* chore: updating go to 1.24

* fixup! chore: updating go to 1.24

* fixup! fixup! chore: updating go to 1.24

* fix device test (drop read error)

* drop older go versions

* drop unrelated formatter changes

---------

Co-authored-by: Iraq Jaber <IraqJaber@gmail.com>
Co-authored-by: Tim Möhlmann <tim+github@zitadel.com>
2025-03-14 16:12:26 +01:00
Tim Möhlmann
efd6fdad7a fix: ignore empty json strings for locale (#678)
* Revert "fix: ignore all unmarshal errors from locale (#673)"

This reverts commit fbf009fe75.

* fix: ignore empty json strings for locale
2025-03-14 10:30:08 +00:00
BitMasher
7a767d8568 feat: add CanGetPrivateClaimsFromRequest interface (#717) 2025-03-12 14:00:29 +02:00
minami yoshihiko
4ef9529012 feat: support for session_state (#712)
* add default signature algorithm

* implements session_state in auth_request.go

* add test

* Update pkg/op/auth_request.go

link to the standard

Co-authored-by: Tim Möhlmann <muhlemmer@gmail.com>

* add check_session_iframe

---------

Co-authored-by: Tim Möhlmann <tim+github@zitadel.com>
Co-authored-by: Tim Möhlmann <muhlemmer@gmail.com>
2025-02-24 10:50:38 +00:00
Steve Ruckdashel
eb98343a65 fix: migrate deprecated io/ioutil.ReadFile to os.ReadFile (#714) 2025-02-21 09:52:02 +00:00
Ramon
de2fd41f40 fix: allow native clients to use https:// on localhost redirects (#691) 2025-01-17 13:53:19 +00:00
isegura-eos-eng
6d20928028 refactor: mark pkg/strings as deprecated in favor of stdlib (#680)
* refactor: mark pkg/strings as deprecated in favor of stdlib

* format: reword deprecate notice and use doc links
2024-11-15 18:47:32 +02:00
isegura-eos-eng
897c720070 fix(op): add scope to access token scope (#664) 2024-11-13 08:49:55 +00:00
Kevin Schoonover
8afb8b8d5f feat(pkg/op): allow custom SupportedScopes (#675)
Co-authored-by: Tim Möhlmann <tim+github@zitadel.com>
2024-11-12 15:06:24 +00:00
David Sharnoff
fbf009fe75 fix: ignore all unmarshal errors from locale (#673) 2024-11-01 10:53:28 +02:00
Livio Spring
f1e4cb2245 feat(OP): add back channel logout support (#671)
* feat: add configuration support for back channel logout

* logout token

* indicate back channel logout support in discovery endpoint
2024-10-30 08:44:31 +00:00
Ayato
3b64e792ed feat(oidc): return defined error when discovery failed (#653)
* feat(oidc): return defined error when discovery failed

* Use errors.Join() to join errors

Co-authored-by: Tim Möhlmann <muhlemmer@gmail.com>

* Remove unnecessary field

Co-authored-by: Tim Möhlmann <muhlemmer@gmail.com>

* Fix order and message

Co-authored-by: Tim Möhlmann <muhlemmer@gmail.com>

* Fix error order

* Simplify error assertion

Co-authored-by: Tim Möhlmann <muhlemmer@gmail.com>

---------

Co-authored-by: Tim Möhlmann <muhlemmer@gmail.com>
2024-09-20 12:33:28 +03:00
Tim Möhlmann
b555396744 fix(oidc): set client ID to access token JWT (#650)
* fix(oidc): set client ID to access token JWT

* fix test
2024-09-10 11:50:54 +02:00
David Sharnoff
67688db4c1 fix: client assertions for Okta (#636)
* fix client assertions for Okta

* review feedback
2024-08-26 11:11:01 +03:00
Tim Möhlmann
1e75773eaa fix(op): initialize http Headers in response objects (#637)
* fix(op): initialize http Headers in response objects

* fix test

---------

Co-authored-by: Livio Spring <livio.a@gmail.com>
2024-08-21 09:34:26 +02:00
Tim Möhlmann
99301930ed feat(crypto): hash algorithm for EdDSA (#638)
* feat(crypto): hash algorithm for EdDSA

* update code comment

* rp: modify keytype check to support EdDSA

* example: signing algs from discovery

---------

Co-authored-by: Livio Spring <livio.a@gmail.com>
2024-08-21 07:32:13 +00:00
Tim Möhlmann
0aa61b0b98 fix(op): do not redirect to unverified uri on error (#640)
Closes #627
2024-08-21 09:29:14 +02:00
Tim Möhlmann
b6f3b1e65b feat(op): allow returning of parent errors to client (#629)
* feat(op): allow returning of parent errors to client

* update godoc

---------

Co-authored-by: Livio Spring <livio.a@gmail.com>
2024-08-09 05:10:11 +00:00
Elio Bischof
6f0a630ad4 fix: overwrite redirect content length (#632)
* fix: overwrite redirect content length

* copy redirect struct headers
2024-08-06 12:58:52 +03:00
Livio Spring
e5a428d4be feat: support PKCS#8 (#623) 2024-07-09 15:55:50 +02:00
Tim Möhlmann
a7b5355580 feat(op): allow scope without openid (#613)
This changes removes the requirement of the openid scope to be set for all token requests.
As this library also support OAuth2-only authentication mechanisms we still want to sanitize requested scopes, but not enforce the openid scope.

Related to https://github.com/zitadel/zitadel/discussions/8068
2024-06-13 08:16:46 +02:00
minami yoshihiko
8a47532a8e feat: add default signature algorithms (#606) 2024-05-17 10:17:54 +00:00
Yuval Marcus
5a84d8c4bc fix: Omit non-standard, empty fields in RefreshTokenRequest when performing a token refresh (#599)
* Add omitempty tags

* Add omitempty to more fields
2024-05-06 08:13:52 +02:00
Yuval Marcus
24d43f538e fix: Handle case where verifier Nonce func is nil (#594)
* Skip nonce check if verifier nonce func is nil

* add unit test
2024-05-02 09:46:12 +02:00
Tim Möhlmann
37ca0e472a feat(op): authorize callback handler as argument in legacy server registration (#598)
This change requires an additional argument to the op.RegisterLegacyServer constructor which passes the Authorize Callback Handler.
This allows implementations to use their own handler instead of the one provided by the package.
The current handler is exported for legacy behavior.

This change is not considered breaking, as RegisterLegacyServer is flagged experimental.

Related to https://github.com/zitadel/zitadel/issues/6882
2024-04-30 20:27:12 +03:00
Kotaro Otaka
3512c72f1c fix: to propagate context (#593)
Co-authored-by: Livio Spring <livio.a@gmail.com>
2024-04-22 11:40:21 +00:00
Kotaro Otaka
68d4e08f6d feat: Added the ability to verify ID tokens using the value of id_token_signing_alg_values_supported retrieved from DiscoveryEndpoint (#579)
* feat(rp): to use signing algorithms from discovery configuration (#574)

* feat: WithSigningAlgsFromDiscovery to verify IDTokenVerifier() behavior in RP with
2024-04-16 08:41:31 +00:00
Ethan Heilman
959376bde7 Fixes typos in GoDoc and comments (#591) 2024-04-16 08:18:32 +00:00
Tim Möhlmann
33f8df7eb2 feat(deps): update go-jose to v4 (#588)
This change updates to go-jose v4, which was a new major release.

jose.ParseSigned now expects the supported signing algorithms to be passed, on which we previously did our own check. As they use a dedicated type for this, the slice of string needs to be converted. The returned error also need to be handled in a non-standard way in order to stay compatible.

For OIDC v4 we should use the jose.SignatureAlgorithm  type directly and wrap errors, instead of returned static defined errors.

Closes #583
2024-04-11 18:13:30 +03:00
Jan-Otto Kröpke
06f37f84c1 fix: Fail safe, if optional endpoints are not given (#582) 2024-04-09 13:02:31 +00:00
Célian GARCIA
e75a061807 feat: support verification_url workaround for DeviceAuthorizationResponse unmarshal (#577) 2024-04-08 13:43:31 +00:00
Célian GARCIA
c89d0ed970 feat: return oidc.Error in case of call token failure (#571) 2024-04-01 13:55:22 +00:00