authmock

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockAuth

type MockAuth struct {
	Err error
}

MockAuth is the structure to mock the auth interface

func NewMockAuth

func NewMockAuth(err error) *MockAuth

NewMockAuth returns a new mock of the Auth interface

func (*MockAuth) Init

func (ma *MockAuth) Init(s string, load auth.Payload) ([]byte, error)

Init - mock of the tokenize function

func (*MockAuth) Refresh

func (ma *MockAuth) Refresh(token []byte) ([]byte, error)

Refresh - mock of the refresh function

func (*MockAuth) Tokenize

func (ma *MockAuth) Tokenize(load auth.Payload) ([]byte, error)

Tokenize - mock of the tokenize function

func (*MockAuth) Validate

func (ma *MockAuth) Validate(token []byte) (*auth.Payload, []byte, error)

Validate - mock of the validate function

Jump to

Keyboard shortcuts

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