jwt

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type Expired

type Expired struct {
	Refresh time.Duration
	Access  time.Duration
}

type Jwt

type Jwt struct {
	Option *interfaces.AuthOption
	// contains filtered or unexported fields
}

func (*Jwt) GenerateToken

func (c *Jwt) GenerateToken(enabletracing bool, ctx context.Context, req *auth.TokenRequestData) (signedToken *auth.UserLoginResponse, err error)

func (*Jwt) GetToken

func (c *Jwt) GetToken(enabletracing bool, ctx context.Context, req *auth.GetTokenRequest) (res *auth.GetTokenResponse, err error)

func (*Jwt) Login

func (c *Jwt) Login(enabletracing bool, ctx context.Context, req *auth.UserLoginRequest) (res *auth.UserLoginResponse, err error)

func (*Jwt) RefreshToken

func (c *Jwt) RefreshToken(enabletracing bool, ctx context.Context, req *auth.RefreshTokenRequest) (res *auth.UserLoginResponse, err error)

func (*Jwt) Session

func (c *Jwt) Session(enabletracing bool, ctx context.Context, req *auth.SessionRequest) (res *auth.SessionResponse, err error)

func (*Jwt) TerminatedSession

func (c *Jwt) TerminatedSession(enabletracing bool, ctx context.Context, req *auth.SessionTerminatedRequest) (res *emptypb.Empty, err error)

func (*Jwt) ValidateToken

func (c *Jwt) ValidateToken(enabletracing bool, tpp auth.TokenType, ctx context.Context, req *auth.SessionRequest) (claim UserClaims, res *auth.SessionResponse, err error)

type UserClaims

type UserClaims struct {
	jwt.RegisteredClaims
	auth.UserClaims
}

Jump to

Keyboard shortcuts

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