Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JWTValidator ¶
type JWTValidator struct {
// contains filtered or unexported fields
}
func (*JWTValidator) KeyFunction ¶
func (self *JWTValidator) KeyFunction(token *jwt.Token) (interface{}, error)
`KeyFunc` in `jwt.Parse`. It validates the signing method (RS256 in this caase). Then, it build token key using JWKs.
func (*JWTValidator) ParseJWT ¶
func (self *JWTValidator) ParseJWT(tokenString string) (jwt.MapClaims, error)
Validate token, its signature, basic claims etc. and return all the claims present in the token.
func (*JWTValidator) Validate ¶
func (self *JWTValidator) Validate(tokenString string) (jwt.MapClaims, error)
Verifies the token. It verifies: - If it is actually a token - Signing method (RS256) - Expiration - Issuer - Client
func (*JWTValidator) VerifyClient ¶
func (self *JWTValidator) VerifyClient(client string) bool
Verify `client_id` in the token.
Click to show internal directories.
Click to hide internal directories.