Versions in this module Expand all Collapse all v1 v1.0.1 Feb 20, 2024 Changes in this version + const JWKSPath + func ExceptLocalhost(publicKeyFunc func() (*ecdsa.PublicKey, error)) gin.HandlerFunc + func GenerateJwksJSON(publicKey *ecdsa.PublicKey) ([]byte, error) + func GenerateKeyPair() (*ecdsa.PrivateKey, *ecdsa.PublicKey, error) + func GenerateToken(username string, privateKey *ecdsa.PrivateKey, id int, issuer string, ...) (string, error) + func GetAccessToken(username string, privateKey *ecdsa.PrivateKey, id int) (string, error) + func GetRefreshToken(username string, private *ecdsa.PrivateKey, id int) (string, error) + func JWKSHandler(jwksJSON []byte) http.Handler + func JWT(publicKeyFunc func() (*ecdsa.PublicKey, error)) gin.HandlerFunc + func PublicKeyFromJwksJSON(jwksJSON []byte) (*ecdsa.PublicKey, error) + type Claims struct + ID int + Username string + func ParseToken(signedToken string, publicKeyFunc func() (*ecdsa.PublicKey, error)) (*Claims, error) + func Validate(token string, publicKeyFunc func() (*ecdsa.PublicKey, error)) (bool, *Claims, error) + type JWK struct + Crv string + Kty string + X string + Y string + type JWKS struct + Keys []JWK