Documentation ¶
Overview ¶
Package tokenutils contains various utilities used to interact with Aporeto JWTs.
Index ¶
Constants ¶
const AudienceAny = "*"
AudienceAny represents any operation, identity or namespace.
Variables ¶
This section is empty.
Functions ¶
func ExtractQuota ¶
ExtractQuota extracts the eventual quota from a token. Not that the token is not verified in the process, you the verification must be done before trusting the extracted quota value.
func UnsecureClaimsMap ¶
UnsecureClaimsMap decodes the claims in the given JWT token without verifying its validity. Only use or trust this after proper validation.
Types ¶
type AudiencesList ¶
type AudiencesList []Audience
AudiencesList is a list of audiences.
func ParseAudience ¶
func ParseAudience(audString string, modelManager elemental.ModelManager) (AudiencesList, error)
ParseAudience parses the audience string and returns an AudiencesList.
func UnsecureAudience ¶
func UnsecureAudience(token string, modelManager elemental.ModelManager) (AudiencesList, error)
UnsecureAudience extracts the audience list from a token string without verifying its validity. Only use or trust this after proper validation.
func (AudiencesList) String ¶
func (a AudiencesList) String() string