jwtservice

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 17, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JWTService

type JWTService struct {
	// contains filtered or unexported fields
}

JWTService handles JWT token generation

func New

func New(issuer string) (*JWTService, error)

New creates a new JWT service

func (*JWTService) GenerateAccessTokenForCert

func (s *JWTService) GenerateAccessTokenForCert(authProcess *models.AuthProcess, certData *models.CertificateData, rp *models.RelyingParty) (string, error)

func (*JWTService) GenerateAccessTokenForCredential

func (s *JWTService) GenerateAccessTokenForCredential(authProcess *models.AuthProcess, cred map[string]any, rp *models.RelyingParty) (string, error)

func (*JWTService) GenerateIDTokenForCert

func (s *JWTService) GenerateIDTokenForCert(authProcess *models.AuthProcess, certData *models.CertificateData, rp *models.RelyingParty) (string, error)

GenerateIDTokenForCert generates an OpenID Connect ID token

func (*JWTService) GenerateIDTokenForCredential

func (s *JWTService) GenerateIDTokenForCredential(authProcess *models.AuthProcess, cred map[string]any, rp *models.RelyingParty) (string, error)

func (*JWTService) GenerateSSOCookieToken

func (s *JWTService) GenerateSSOCookieToken(claims jwt.MapClaims) (string, error)

GenerateSSOCookieToken generates a JWT token for the SSO cookie

func (*JWTService) GenerateToken

func (s *JWTService) GenerateToken(header map[string]any, claims jwt.Claims) (string, error)

func (*JWTService) GetJWKS

func (s *JWTService) GetJWKS() map[string]any

GetJWKS returns the JSON Web Key Set

func (*JWTService) GetPublicKey

func (s *JWTService) GetPublicKey() (string, error)

GetPublicKey returns the public key in PEM format for JWKS

func (*JWTService) Issuer

func (s *JWTService) Issuer() string

Issuer returns the issuer of the JWT

func (*JWTService) IssuerDID

func (s *JWTService) IssuerDID() string

IssuerDID return the DID associated to the issuer

func (*JWTService) ParseSSOCookieToken

func (s *JWTService) ParseSSOCookieToken(tokenString string) (jwt.MapClaims, error)

ParseSSOCookieToken parses a JWT token from the SSO cookie

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL