Skip to content

Conversation

MarcusGrass
Copy link
Contributor

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.

@Keats Keats merged commit ac10042 into Keats:master Sep 29, 2025
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.

2 participants