Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatible latest versions #275

Closed
deschmih opened this issue Jun 27, 2023 · 3 comments
Closed

Incompatible latest versions #275

deschmih opened this issue Jun 27, 2023 · 3 comments

Comments

@deschmih
Copy link

deschmih commented Jun 27, 2023

Hi,

Iam using github.com/xenitab/go-oidc-middleware and github.com/xenitab/go-oidc-middleware/oidcechojwt in my golang project. With the latest go-module update I got this entries in my go.mod file:

github.com/xenitab/go-oidc-middleware v0.0.43
github.com/xenitab/go-oidc-middleware/oidcechojwt v0.0.41

This versions leads to compiler errors.

# github.com/xenitab/go-oidc-middleware/oidcechojwt
../../vendor/github.com/xenitab/go-oidc-middleware/oidcechojwt/echo_jwt.go:26:16: cannot use description (variable of type options.ErrorDescription) as context.Context value in argument to errorHandler: options.ErrorDescription does not implement context.Context (missing method Deadline)
../../vendor/github.com/xenitab/go-oidc-middleware/oidcechojwt/echo_jwt.go:26:29: cannot use err (variable of type error) as *options.OidcError value in argument to errorHandler

This is because type ErrorHandler in https://github.com/XenitAB/go-oidc-middleware/blob/0d8f58d70ec482f8255a41ef1d41b4cb74cdc6f0/options/options.go#L50C73-L50C73 has changed since version 0.42 to type ErrorHandler func(ctx context.Context, oidcErr *OidcError) *Response
To solve this isssue please provide a new tagged version v0.0.43 for github.com/xenitab/go-oidc-middleware/oidcechojwt.

Thanks in advance.

Kind regards,
Michael

@simongottschlag
Copy link
Member

Hi @deschmih!

The module oidcechojwt has been deprecated in favor for oidcecho. Would it be possible to switch over to it for you?

@bittrance
Copy link
Contributor

I believe this is a product of #256 (and #260). The new oidcecho package should be a drop-in replacement. However, I see that I did not update the README properly to say that we retired the old module. We should have some migration instructions here https://github.com/XenitAB/go-oidc-middleware#echo-jwt-parsetokenfunc (and stop talking about the parsetokenfunc).

@bittrance
Copy link
Contributor

@deschmih Main branch now has a bit of changelog to say what changed. Did you manage to switch to oidcecho?

@deschmih deschmih closed this as completed Jul 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants