-
Notifications
You must be signed in to change notification settings - Fork 212
Add Check PCKE Support #563
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
base: main
Are you sure you want to change the base?
Add Check PCKE Support #563
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
I moved some stuff around so you will have to rebase!
oauthex/oauthex.go
Outdated
// RequirePKCE checks that the authorization server for issuerURL supports PKCE, | ||
// by verifying that CodeChallengeMethodsSupported is non-empty. | ||
// It returns an error if metadata cannot be fetched or PKCE is not advertised. | ||
func RequirePKCE(ctx context.Context, issuerURL string, c *http.Client) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move this to auth_meta after rebasing
6d6e1c2
to
40f7fb4
Compare
Hi @samthanawalla updated, kindly help to review again. thanks! |
return nil, fmt.Errorf("failed to get auth server metadata from %q: %w", issuerURL, errors.Join(errs...)) | ||
} | ||
|
||
// RequirePKCE checks that the authorization server for issuerURL supports PKCE, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should have an exported function for this. Why can't we do it inside GetAuthServerMeta?
Refer To Issue 473
Changes: