Skip to content

Commit

Permalink
Pointing out breaking changelogs for v0.0.41 and v0.0.42.
Browse files Browse the repository at this point in the history
  • Loading branch information
Anders Qvist committed Jun 29, 2023
1 parent 0d8f58d commit eb69b16
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ This is a middleware for http to make it easy to use OpenID Connect.

Below, large (breaking) changes will be documented:

### v0.0.42

Error handlers now have access to the request and have full control over the HTTP response sent to the client. Among other things, this can be used to return structured error responses a la [RFC7807](https://datatracker.ietf.org/doc/html/rfc7807). However, this comes with a breaking interface change: error handler contract changes from `type ErrorHandler func(description ErrorDescription, err error)` to `errorHandler(ctx context.Context, oidcErr *options.OidcError) *options.Response`. To retain the behavior of your error handler, update your error handler signature accordingly, change `description` to `oidcErr.Status`, `err` to `oidcErr.Error` and add an explicit `return nil`.

### v0.0.41

The `oidcechojwt` adapter is replaced by `oidcecho` which brings in line with the other adapters in that it operates as a ordinary middleware. This makes all adapters full HTTP middlewares. That makes it easier to add new features, such as the the upcoming error handling changes. The new adapter provides identical features.

### v0.0.37

From `v0.0.37` and forward, the `options.WithRequiredClaims()` has been deprecated and generics are used to provide the claims type. A new validation function can be provided instead of `options.WithRequiredClaims()`. If you don't need claims validation, you can pass `nil` instead of a `ClaimsValidationFn`.
Expand Down

0 comments on commit eb69b16

Please sign in to comment.