iamjwt

package
v0.28.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 12, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromIncomingContext

func FromIncomingContext(ctx context.Context, key string) (string, bool)

FromIncomingContext looks up a JWT token in the incoming gRPC request metadata by key.

Types

type Payload

type Payload struct {
	Issuer   string `json:"iss"`
	Audience string `json:"aud"`
	Expires  int64  `json:"exp"`
	Subject  string `json:"sub"`
}

Payload is a generic JWT token payload.

func (*Payload) UnmarshalToken

func (t *Payload) UnmarshalToken(token string) error

UnmarshalToken unmarshals the provided JWT token. No claims verification or signature validation is performed.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL