Release v0.23.0
Summary
Token exchange grant (RFC 8693) is now supported. Provider option names have been standardized for consistency, and OpenID Federation configuration has been streamlined.
Breaking Changes
Option Renames
Handler/action callbacks drop the Func suffix and use a noun-suffix pattern:
WithHandleGrantFunc->WithGrantHandlerWithHandleTokenFunc->WithTokenHandlerWithHandleErrorFunc->WithErrorHandlerWithRenderErrorFunc->WithErrorRendererWithDCRHandleClientFunc->WithDCRClientHandlerWithDCRValidateInitialTokenFunc->WithDCRInitialTokenValidatorWithVerifyClientSecretFunc->WithClientSecretVerifierWithConsumeJTIFunc->WithJTIConsumerWithRARValidateDetailFunc->WithRARDetailValidatorWithRARCompareDetailsFunc->WithRARDetailsComparatorWithPairwiseSubjectFunc->WithPairwiseSubjectWithPARHandleSessionFunc->WithPARSessionHandlerWithCIBAHandleSessionFunc->WithCIBASessionHandlerWithRefreshTokenShouldIssueFunc->WithRefreshTokenShouldIssueWithClientIDFunc->WithDCRClientIDWithAuthTimeout->WithAuthSessionLifetimeWithSignerFunc->WithSignerWithDecrypterFunc->WithDecrypterWithOpenIDFedSignerFunc->WithOpenIDFedSignerWithOpenIDFedHTTPClientFunc->WithOpenIDFedHTTPClientWithOpenIDFedHandleClientFunc->WithOpenIDFedClientHandlerWithOpenIDFedRequiredTrustMarksFunc->WithOpenIDFedRequiredClientTrustMarks
OpenID Federation
WithOpenIDFederationsignature changed. Trusted anchors are now a[]stringslice instead of variadic, and authority hints are a required parameter:WithOpenIDFederation(manager, jwksFunc, authorityHints, trustedAnchors).WithOpenIDFedAuthorityHintsremoved. Authority hints are now passed directly toWithOpenIDFederation.WithOpenIDFedTrustMarkrenamed toWithOpenIDFedTrustMarksand now takes...goidc.TrustMarkConfiginstead ofmap[goidc.TrustMark]string.- New
goidc.TrustMarkConfigtype replaces the previous map-based trust mark configuration.
Other Breaking Changes
goidc.HandleGrantFuncsignature changed. Now receivesGrantTypeas a second argument:func(context.Context, GrantType, *Grant) error.goidc.JWTBearerHandleAssertionFuncreturn type changed. Now returnsgoidc.JWTBearerResultinstead of a plainstringsubject, allowing aStoremap to be passed through.
New Features
- Token exchange grant (RFC 8693). New
WithTokenExchangeGrant(handler)option enablesurn:ietf:params:oauth:grant-type:token-exchange. UseWithTokenExchangeClientAuthnRequired()to require client authentication. New types:goidc.TokenExchangeRequest,goidc.TokenExchangeResult,goidc.TokenExchangeHandleFunc,goidc.TokenTypeIdentifier. - Token exchange does not require client authentication by default, aligning with RFC 8693 which leaves this to deployment policy.
WithDefaultAuthnsets the default client authentication method.
What's Changed
- feat: token exchange by @luikyv in #125
- Dev by @luikyv in #126
- feat: federation tests by @luikyv in #127
Full Changelog: v0.22.0...v0.23.0