auth

package
v0.0.0-...-7208f07 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2023 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

ProviderSet is a provider set for wire

Functions

This section is empty.

Types

type IAuthBiz

type IAuthBiz interface {
	GetLoginURL(ctx contextx.Contextx, state string) string

	Callback(ctx contextx.Contextx, code string) (info *user.Profile, err error)

	VerifyToken(ctx contextx.Contextx, token string) (info *user.Profile, err error)

	HasPermission(ctx contextx.Contextx, token, obj, act string) (bool, error)
}

IAuthBiz declare auth business functions

func CreateIBiz

func CreateIBiz(repo2 repo.IAuthRepo, auth authenticator.Authenticator, jwt2 jwt.IJwt, node2 node.Generator) (IAuthBiz, error)

func NewImpl

func NewImpl(repo repo.IAuthRepo, auth authenticator.Authenticator, jwt jwt.IJwt, node node.Generator) IAuthBiz

NewImpl return IAuthBiz

type MockIAuthBiz

type MockIAuthBiz struct {
	mock.Mock
}

MockIAuthBiz is an autogenerated mock type for the IAuthBiz type

func NewMockIAuthBiz

func NewMockIAuthBiz(t mockConstructorTestingTNewMockIAuthBiz) *MockIAuthBiz

NewMockIAuthBiz creates a new instance of MockIAuthBiz. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockIAuthBiz) Callback

func (_m *MockIAuthBiz) Callback(ctx contextx.Contextx, code string) (*user.Profile, error)

Callback provides a mock function with given fields: ctx, code

func (*MockIAuthBiz) GetLoginURL

func (_m *MockIAuthBiz) GetLoginURL(ctx contextx.Contextx, state string) string

GetLoginURL provides a mock function with given fields: ctx, state

func (*MockIAuthBiz) HasPermission

func (_m *MockIAuthBiz) HasPermission(ctx contextx.Contextx, token string, obj string, act string) (bool, error)

HasPermission provides a mock function with given fields: ctx, token, obj, act

func (*MockIAuthBiz) VerifyToken

func (_m *MockIAuthBiz) VerifyToken(ctx contextx.Contextx, token string) (*user.Profile, error)

VerifyToken provides a mock function with given fields: ctx, token

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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