This add a WithAudience validator and a convenience RequireAudience method on Enforcer. If specified, the enforcer will check that the token has the audience string specified, or one of the special wildcard audiences, by default "ANY" and "https://wlcg.cern.ch/jwt/v1/any". If not specified, audience will not be checked at all.
This also adds Version() string to the SciToken interface, and methods to retrieve the version from the ver or wlcg.ver claim. In the latter case the version will be returned as wlcg:$ver.
This add a
WithAudience
validator and a convenienceRequireAudience
method on Enforcer. If specified, the enforcer will check that the token has the audience string specified, or one of the special wildcard audiences, by default "ANY" and "https://wlcg.cern.ch/jwt/v1/any". If not specified, audience will not be checked at all.This also adds
Version() string
to the SciToken interface, and methods to retrieve the version from thever
orwlcg.ver
claim. In the latter case the version will be returned aswlcg:$ver
.Fixes #4