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

Support multiple issuer:audience combinations #276

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Jul 3, 2024

  1. feat: support multiple issuer:audience combinations by introducing an…

    … option for the expectedClaims. WithExpectedClaims can be called with multiple jwt.Expected parameters to allow different Issuer:Audience combinations to validate tokens
    
    feat: support multiple issuers in a provider using WithAdditionalIssuers option
    
    Every effort has been made to ensure backwards compatibility. Some error messages will be different due to the wrapping of errors when multiple jwt.Expected are set. When validating the jwt, if an error is encountered, instead of returning immediately, the current error is wrapped. This is good and bad. Good because all verification failure causes are captured in a single wrapped error; Bad because all verification failure causes are captured in a single monolithic wrapped error. Unwrapping the error can be tedious if many jwt.Expected are included. There is likely a better way but this suits my purposes.
    
    A few more test cases will likely be needed in order to achieve true confidence in this change
    cmmoran committed Jul 3, 2024
    Configuration menu
    Copy the full SHA
    f5c7e8e View commit details
    Browse the repository at this point in the history