12 lines
302 B
Go
12 lines
302 B
Go
|
|
package authjwt
|
||
|
|
|
||
|
|
import "github.com/golang-jwt/jwt/v5"
|
||
|
|
|
||
|
|
// Signer signs and verifies JWTs.
|
||
|
|
// NewHMACSigner, NewRSASigner, and NewECSigner return implementations backed by
|
||
|
|
// HS256, RS256, and ES256/ES384/ES512 respectively.
|
||
|
|
type Signer interface {
|
||
|
|
Verifier
|
||
|
|
Sign(claims jwt.Claims) (string, error)
|
||
|
|
}
|