jwt icon indicating copy to clipboard operation
jwt copied to clipboard

Validate multiple subjects

Open miparnisari opened this issue 1 year ago • 1 comments

https://github.com/golang-jwt/jwt/blob/5ec246c074b71790eec1f2e05b54daf6ec29ec5f/parser_option.go#L97-L105

Would it be possible to add a convenience validator method jwt.WithSubjects(subjects []string) that returns an error if the request's subject doesn't match any of the subjects?

miparnisari avatar Sep 16 '24 19:09 miparnisari

I'm curious about the use case for checking against multiple subjects, since typically you'd have a JWT representing claims about one specific subject. Delegation?

mfridman avatar Oct 21 '24 23:10 mfridman