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

Treat empty audience as equivalent to no audience #350

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

Conversation

MarcusGrass
Copy link

Hello,

There's a specific case where audience is supplied but empty, which I think should be treated as the same as audience not being supplied.

Ie:

{
    "iss": ...,
    "aud": [],
    "exp": ...
    ...
}

Will fail validation if options.aud is None.
While (no aud)

{
    "iss": ...,
    "exp": ...
    ...
}

passes validation in that same case where options.aud is None.

The user could just turn off audience validation, but the default is audience validation on, which is reasonable, but then it should accept the supplied but empty audience.

This could also be fixed by changing the deserialization, an empty vec gets deserialized into Multiple but it could be deserialized into NotPresent, but that is a bit trickier.

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

Successfully merging this pull request may close these issues.

1 participant