Documentation
¶
Index ¶
- func ApiKey(expected string) gin.HandlerFunc
- func ParseRSAPrivateKey(pem string) (*rsa.PrivateKey, error)
- func ParseToken(tokenString, secret string) (jwt.MapClaims, error)
- func ValidateRS256(tokenString string, pub *rsa.PublicKey, issuer string, audience string) (jwt.MapClaims, error)
- type JWK
- type JWKS
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApiKey ¶
func ApiKey(expected string) gin.HandlerFunc
ApiKey returns a Gin middleware that enforces the ?key= query parameter.
func ParseRSAPrivateKey ¶
func ParseRSAPrivateKey(pem string) (*rsa.PrivateKey, error)
ParseRSAPrivateKey loads an RSA private key from PEM.
func ParseToken ¶
ParseToken validates a JWT string, defaulting the secret when empty, and returns claims.
Types ¶
Click to show internal directories.
Click to hide internal directories.