Repository navigation
Feat/audience - #10
Closed
SebastienLaurent-CF wants to merge 6 commits into
Closed
SebastienLaurent-CF wants to merge 6 commits into
SebastienLaurent-CF wants to merge 6 commits into
Conversation
- Update configuration schema and Go structs to include idTokenKey - Support saving ID tokens to .env files when configured - Add --id-token flag to get command for direct output - Add --id-token flag to inspect command for decoding - Make ID token verification non-fatal to increase robustness - Add unit tests for config loading and OIDC token handling - Update README.md with new configuration options and flags
- Refactor `targets` schema to use `type` field instead of `idTokenKey` - Update `inspect` command to intelligently resolve files and keys from the targets list - Improve documentation for multiple target files and fix invalid examples in README - Maintain backward compatibility for simple configuration via `tokenKey` and `idTokenKey`
- Make clientSecret optional and add "none" authMethod - Send client_id in request body without secret for public clients - Reject client_credentials flow when no secret is configured - Add config and OIDC tests for public client behaviour - Document Keycloak public client setup in README
- Add optional `oidc.audience` to config schema and OIDCConfig - Send audience in Client Credentials flow via endpoint params - Implement Password grant with audience (unsupported by x/oauth2) - Add tests for all auth methods, error response and config loading - Document audience option with an Auth0 example in README
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
✨ Add optional
audienceparameter for token requestsWhy
Some providers need an
audience(or API identifier) on the token request to issue an access token for a given API. Without it, Auth0 returns an opaque token instead of a JWT, or rejects the Client Credentials request. Okta custom authorization servers and some Keycloak setups also rely on it. authk had no way to send this parameter.What
oidc.audiencefield (CUE schema +OIDCConfig).clientcredentials.Config.EndpointParams.oauth2.Config.PasswordCredentialsTokendoes not accept extra parameters, so a dedicatedpasswordCredentialsTokensends the request when an audience is set. It:basic,postandnone(public client) auth methodsrefresh_token, expiry andid_token(token extras)*oauth2.RetrieveErroron error, like the libraryaudienceadded to the README config example, plus a new Auth0 example.Configs without
audiencekeep using the library code path, so their behaviour is unchanged.Example