onexx

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromAccessToken

func FromAccessToken(ctx context.Context) string

FromAccessToken extract accessToken from context.

func FromContext

func FromContext(ctx context.Context) (token *jwt.RegisteredClaims, ok bool)

FromContext extract auth info from context.

func FromUserID

func FromUserID(ctx context.Context) string

FromUserID extract userID from context.

func NewAccessToken

func NewAccessToken(ctx context.Context, accessToken string) context.Context

NewAccessToken put accessToken into context.

func NewContext

func NewContext(ctx context.Context, info *jwt.RegisteredClaims) context.Context

NewContext put auth info into context.

func NewUserID

func NewUserID(ctx context.Context, userID string) context.Context

NewUserID put userID into context.

Types

This section is empty.

Jump to

Keyboard shortcuts

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