Versions in this module Expand all Collapse all v0 v0.1.0 Mar 29, 2023 Changes in this version + var ErrUnauthorized = errors.New("Missing or invalid access token") + var TokenClaimsContextKey = &contextKey + func GoKitMiddleware(v verifier) endpoint.Middleware + func Middleware(v verifier) func(http.Handler) http.Handler + func RefreshToken(jwt interface{ ... }) http.HandlerFunc + func RequestAuth(w http.ResponseWriter, r *http.Request) + func VerifySignature(message, signature, publicKey string) error + func VerifySignedMessage(jwt interface{ ... }) http.HandlerFunc + type Claims struct + Wallet string + func GetClaimsFromContext(ctx context.Context) *Claims + func GetClaimsFromRequest(r *http.Request) *Claims + type JWT struct + func NewJWT(signingKey []byte) *JWT + func (j *JWT) IssueTokens(walletAddr string) (TokenResponse, error) + func (j *JWT) RefreshToken(tokenString string) (TokenResponse, error) + func (j *JWT) VerifyToken(tokenString string) (*Claims, error) + type RefreshTokenPayload struct + RefreshToken string + type RequestAuthHandlePayload struct + PublicKey string + type TokenResponse struct + Access string + ExpiresIn int64 + Refresh string + type VerifySignedMessagePayload struct + Message string + PublicKey string + Signature string + func (p *VerifySignedMessagePayload) Validate() error