Versions in this module Expand all Collapse all v1 v1.7.0 Aug 10, 2022 Changes in this version + func ES256Template() *tinkpb.KeyTemplate + func ES384Template() *tinkpb.KeyTemplate + func ES512Template() *tinkpb.KeyTemplate + func HS256Template() *tinkpb.KeyTemplate + func HS384Template() *tinkpb.KeyTemplate + func HS512Template() *tinkpb.KeyTemplate + func JWKSetFromPublicKeysetHandle(kh *keyset.Handle) ([]byte, error) + func JWKSetToPublicKeysetHandle(jwkSet []byte) (*keyset.Handle, error) + func RawES256Template() *tinkpb.KeyTemplate + func RawES384Template() *tinkpb.KeyTemplate + func RawES512Template() *tinkpb.KeyTemplate + func RawHS256Template() *tinkpb.KeyTemplate + func RawHS384Template() *tinkpb.KeyTemplate + func RawHS512Template() *tinkpb.KeyTemplate + type MAC interface + ComputeMACAndEncode func(token *RawJWT) (string, error) + VerifyMACAndDecode func(compact string, validator *Validator) (*VerifiedJWT, error) + func NewMAC(h *keyset.Handle) (MAC, error) + type RawJWT struct + func NewRawJWT(opts *RawJWTOptions) (*RawJWT, error) + func NewRawJWTFromJSON(typeHeader *string, jsonPayload []byte) (*RawJWT, error) + func (r *RawJWT) ArrayClaim(name string) ([]interface{}, error) + func (r *RawJWT) Audiences() ([]string, error) + func (r *RawJWT) BooleanClaim(name string) (bool, error) + func (r *RawJWT) CustomClaimNames() []string + func (r *RawJWT) ExpiresAt() (time.Time, error) + func (r *RawJWT) HasArrayClaim(name string) bool + func (r *RawJWT) HasAudiences() bool + func (r *RawJWT) HasBooleanClaim(name string) bool + func (r *RawJWT) HasExpiration() bool + func (r *RawJWT) HasIssuedAt() bool + func (r *RawJWT) HasIssuer() bool + func (r *RawJWT) HasJWTID() bool + func (r *RawJWT) HasNotBefore() bool + func (r *RawJWT) HasNullClaim(name string) bool + func (r *RawJWT) HasNumberClaim(name string) bool + func (r *RawJWT) HasObjectClaim(name string) bool + func (r *RawJWT) HasStringClaim(name string) bool + func (r *RawJWT) HasSubject() bool + func (r *RawJWT) HasTypeHeader() bool + func (r *RawJWT) IssuedAt() (time.Time, error) + func (r *RawJWT) Issuer() (string, error) + func (r *RawJWT) JSONPayload() ([]byte, error) + func (r *RawJWT) JWTID() (string, error) + func (r *RawJWT) NotBefore() (time.Time, error) + func (r *RawJWT) NumberClaim(name string) (float64, error) + func (r *RawJWT) ObjectClaim(name string) (map[string]interface{}, error) + func (r *RawJWT) StringClaim(name string) (string, error) + func (r *RawJWT) Subject() (string, error) + func (r *RawJWT) TypeHeader() (string, error) + type RawJWTOptions struct + Audience *string + Audiences []string + CustomClaims map[string]interface{} + ExpiresAt *time.Time + IssuedAt *time.Time + Issuer *string + JWTID *string + NotBefore *time.Time + Subject *string + TypeHeader *string + WithoutExpiration bool + type Signer interface + SignAndEncode func(rawJWT *RawJWT) (string, error) + func NewSigner(h *keyset.Handle) (Signer, error) + type Validator struct + func NewValidator(opts *ValidatorOpts) (*Validator, error) + func (v *Validator) Validate(rawJWT *RawJWT) error + type ValidatorOpts struct + AllowMissingExpiration bool + ClockSkew time.Duration + ExpectIssuedInThePast bool + ExpectedAudience *string + ExpectedAudiences *string + ExpectedIssuer *string + ExpectedTypeHeader *string + FixedNow time.Time + IgnoreAudiences bool + IgnoreIssuer bool + IgnoreTypeHeader bool + type VerifiedJWT struct + func (v *VerifiedJWT) ArrayClaim(name string) ([]interface{}, error) + func (v *VerifiedJWT) Audiences() ([]string, error) + func (v *VerifiedJWT) BooleanClaim(name string) (bool, error) + func (v *VerifiedJWT) CustomClaimNames() []string + func (v *VerifiedJWT) ExpiresAt() (time.Time, error) + func (v *VerifiedJWT) HasArrayClaim(name string) bool + func (v *VerifiedJWT) HasAudiences() bool + func (v *VerifiedJWT) HasBooleanClaim(name string) bool + func (v *VerifiedJWT) HasExpiration() bool + func (v *VerifiedJWT) HasIssuedAt() bool + func (v *VerifiedJWT) HasIssuer() bool + func (v *VerifiedJWT) HasJWTID() bool + func (v *VerifiedJWT) HasNotBefore() bool + func (v *VerifiedJWT) HasNullClaim(name string) bool + func (v *VerifiedJWT) HasNumberClaim(name string) bool + func (v *VerifiedJWT) HasObjectClaim(name string) bool + func (v *VerifiedJWT) HasStringClaim(name string) bool + func (v *VerifiedJWT) HasSubject() bool + func (v *VerifiedJWT) HasTypeHeader() bool + func (v *VerifiedJWT) IssuedAt() (time.Time, error) + func (v *VerifiedJWT) Issuer() (string, error) + func (v *VerifiedJWT) JSONPayload() ([]byte, error) + func (v *VerifiedJWT) JWTID() (string, error) + func (v *VerifiedJWT) NotBefore() (time.Time, error) + func (v *VerifiedJWT) NumberClaim(name string) (float64, error) + func (v *VerifiedJWT) ObjectClaim(name string) (map[string]interface{}, error) + func (v *VerifiedJWT) StringClaim(name string) (string, error) + func (v *VerifiedJWT) Subject() (string, error) + func (v *VerifiedJWT) TypeHeader() (string, error) + type Verifier interface + VerifyAndDecode func(compact string, validator *Validator) (*VerifiedJWT, error) + func NewVerifier(h *keyset.Handle) (Verifier, error)