Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
Back to tool/Back to issues
#408·jwt

Validate multiple subjects

Author: miparnisariCreated Sep 16, 2024Updated Oct 21, 2024

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?

Source: golang-jwt/jwt

View original on GitHubView discussion on GitHub