Versions in this module Expand all Collapse all v0 v0.1.1 Aug 12, 2026 v0.1.0 Jun 11, 2026 Changes in this version + const DefaultBcryptCost + const PKCEMaxVerifierLength + const PKCEMinVerifierLength + var ErrClientSecretMismatch = errors.New("client secret mismatch") + func AssertionAlgorithms() []jose.SignatureAlgorithm + func BuildJWKS(keys ...*KeyPair) jose.JSONWebKeySet + func CompareBcrypt(hash, plaintext string) error + func CompareClientSecret(hash, plaintext string) error + func CompareHash(hash, plain string) bool + func ComputeATH(accessToken string) string + func ComputeJKT(jwk jose.JSONWebKey) (string, error) + func ComputeS256Challenge(verifier string) string + func CreateDPoPProof(signer jose.Signer, jti, htm, htu string, iat time.Time, nonce, ath string) (string, error) + func GenerateAuthCode() string + func GenerateClientID() string + func GenerateClientSecret() string + func GenerateNonce() string + func GenerateRandomString(n int) string + func GenerateVerifier() string + func HashBcrypt(plaintext string) (string, error) + func HashClientSecret(plaintext string) (string, error) + func HashSHA256(s string) string + func IsDPoPBound(claims *AccessTokenClaims) bool + func NewDPoPSigner(privateKey interface{}, alg jose.SignatureAlgorithm) (jose.Signer, error) + func SetClientSecretPepper(pepper string) + func SignAccessToken(kp *KeyPair, claims AccessTokenClaims) (string, error) + func ValidateAccessTokenClaims(c AccessTokenClaims) error + func ValidateChallengeMethod(method string) error + func ValidateIDJAG(raw string, trustedKeys *jose.JSONWebKeySet, expectedAudience string, ...) (*token.IdentityAssertion, error) + func VerifyS256(verifier, challenge string) error + type AccessTokenClaims struct + Act map[string]interface{} + AgentChain []string + AgentID string + Audience []string + ClientID string + Cnf map[string]interface{} + Expiry int64 + IssuedAt int64 + Issuer string + JTI string + MayAct map[string]interface{} + NotBefore int64 + Scope string + Subject string + func VerifyAccessToken(token string, jwks *jose.JSONWebKeySet) (*AccessTokenClaims, error) + func VerifyAccessTokenWithIssuer(token string, jwks *jose.JSONWebKeySet, expectedIssuer string) (*AccessTokenClaims, error) + func (c *AccessTokenClaims) HasAudience(aud string) bool + type DPoPResult struct + JKT string + JTI string + Nonce string + func ValidateProof(proof, method, reqURL, serverNonce, accessTokenHash string, ...) (*DPoPResult, error) + type KeyPair struct + Algorithm jose.SignatureAlgorithm + KeyID string + PrivateKey crypto.Signer + PublicKey crypto.PublicKey + func GenerateKeyPair(alg, kid string) (*KeyPair, error)