identity

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrNotFound identityError = iota
	ErrWrongType
)

Variables

This section is empty.

Functions

func SetOnContext

func SetOnContext(ctx context.Context, identity Identity) (context.Context, error)

Types

type Identity

type Identity struct {
	TenantID   uuid.UUID
	MerchantID uuid.UUID
	UserID     uuid.UUID
	JWT        string
	Role       string
	Scope      string
}

Identity includes values that are injected by the gateway into the header of the request and are passed downstream

func FromContext

func FromContext(ctx context.Context) (Identity, error)

Jump to

Keyboard shortcuts

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