handler

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

Handler is used to handle all jwt service functions

func (Handler) AccessAndRefreshTokens

func (handler Handler) AccessAndRefreshTokens(
	ctx context.Context,
	request *proto.JWTData) (*proto.AccessAndRefreshToken, error)

AccessAndRefreshTokens is used to generate access and refresh tokens

func (Handler) FreshToken

func (handler Handler) FreshToken(
	ctx context.Context,
	request *proto.JWTData) (*proto.Token, error)

FreshToken is used to generate fresh token

func (*Handler) Init

func (handler *Handler) Init()

Init is used to initialize

func (Handler) RefreshTokens

func (handler Handler) RefreshTokens(
	ctx context.Context,
	request *proto.Token) (*proto.AccessAndRefreshToken, error)

RefreshTokens is used to make access and refresh token based on refresh token

func (Handler) ValidateToken

func (handler Handler) ValidateToken(
	ctx context.Context,
	request *proto.Token) (response *proto.Claims, err error)

ValidateToken is used to validate a token

Jump to

Keyboard shortcuts

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