Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Method ¶
type Method interface {
// Alg returns the algorithm name (e.g., "HS256")
Alg() string
// Sign creates a signature for the given signing string
Sign(signingString string, key any) (string, error)
// Verify verifies a signature against the signing string
Verify(signingString string, signature string, key any) error
// Hash returns the crypto.Hash used by this method
Hash() crypto.Hash
}
Method represents a signing method for JWT tokens. Implementations must be thread-safe for concurrent use.
func GetHMACMethod ¶
GetHMACMethod returns the HMAC signing method for the given algorithm
Click to show internal directories.
Click to hide internal directories.