auth_driver

package
v1.1.0-beta Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterAuthFactory

func RegisterAuthFactory(name string, auth IFactory)

Types

type Auth

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

func (*Auth) AuthConfig

func (a *Auth) AuthConfig() IAuthConfig

func (*Auth) GenerateID

func (a *Auth) GenerateID(position string, tokenName string) string

func (*Auth) Type

func (a *Auth) Type() string

type Factory

type Factory[T any] struct {
	// contains filtered or unexported fields
}

func NewFactory

func NewFactory[T any](driver string) *Factory[T]

func (*Factory[T]) Create

func (f *Factory[T]) Create(config interface{}) (IAuth, error)

type IAuth

type IAuth interface {
	GenerateID(position string, tokenName string) string
	Type() string
	AuthConfig() IAuthConfig
}

type IAuthConfig

type IAuthConfig interface {
	ID() string
	Valid() ([]byte, error)
	Detail() []application_authorization_dto.DetailItem
}

type IFactory

type IFactory interface {
	Create(config interface{}) (IAuth, error)
}

func GetAuthFactory

func GetAuthFactory(name string) (IFactory, bool)

type Manager

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

func NewManager

func NewManager() *Manager

func (*Manager) GetAuth

func (m *Manager) GetAuth(name string) (IFactory, bool)

func (*Manager) RegisterAuth

func (m *Manager) RegisterAuth(name string, auth IFactory)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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