Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CognitoClaim ¶
type CognitoClaim struct {
TokenUse string `json:"token_use"`
Scope string `json:"scope"`
ClientID string `json:"client_id"`
Version int `json:"version"`
}
CognitoClaim defines a JWT Claim for tokens issued by the AWS Cognito Service
type Config ¶
type Config struct {
JSONWebKeySetURL string // JSON Web Key Set (JWKS) URL for JSON Web Token (JWT) Verification
ValidIssuer string // URL of the JWT Issuer for this environment
}
Config contains configuration for the JOSE package
func (*Config) RegisterFlags ¶
RegisterFlags registers JOSE flags with pflags
type JOSE ¶
type JOSE struct {
// contains filtered or unexported fields
}
JOSE contains configuration for handling JWTs, JWKS, and other JOSE specifications
func (JOSE) ParseValidateJWT ¶
ParseValidateJWT accepts a string containing a JWT token and attempts to parse and validate the token. If you wish to inspect other components of the payload, you may supply one or more claims structs which will be populated if the JWT is valid. Claims must be structs with json fields that match the keys in the payload field, or a map[string]interface{}. Use of map[string]interface{} is strongly discouraged.