jwtservicemock

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: May 3, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	mock.Mock
}

Service is a mock of a JWT Service.

func Provide

func Provide() *Service

Provide provides a mock JWT Service.

func (*Service) GenerateAuthToken

func (j *Service) GenerateAuthToken(user domain.User) (*domain.AuthToken, error)

GenerateToken mocks JWTService's GenerateToken function.

func (*Service) GenerateRefreshToken

func (j *Service) GenerateRefreshToken(user domain.User, authToken domain.AuthToken, parentToken *domain.RefreshToken) (*domain.RefreshToken, error)

func (*Service) ValidateAuthToken

func (j *Service) ValidateAuthToken(token domain.TokenValue) (domain.AuthToken, error)

ValidateToken mocks JWTService's ValidateToken function.

func (*Service) ValidateRefreshToken

func (j *Service) ValidateRefreshToken(token domain.TokenValue) (domain.RefreshToken, error)

Jump to

Keyboard shortcuts

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