auth

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthRequest added in v0.8.0

type AuthRequest interface {
	GetPassword() string
	GetUserName() string
}

type Authorizer

type Authorizer interface {
	Authorize(ctx context.Context, msg AuthRequest) (bool, error)
}

type DashboardAuthorizer added in v0.8.0

type DashboardAuthorizer struct {
	URL    string
	Client *http.Client
}

DashboardAuthorizer authorize with cosmo-dashboard login API

func NewDashboardAuthorizer added in v0.8.0

func NewDashboardAuthorizer(url string, ca []byte) *DashboardAuthorizer

func (*DashboardAuthorizer) Authorize added in v0.8.0

func (a *DashboardAuthorizer) Authorize(ctx context.Context, msg AuthRequest) (bool, error)

type PasswordSecretAuthorizer added in v0.5.0

type PasswordSecretAuthorizer struct {
	client.Client
}

PasswordSecretAuthorizer authorize with cosmo user's password secret

func NewPasswordSecretAuthorizer added in v0.5.0

func NewPasswordSecretAuthorizer(c client.Client) *PasswordSecretAuthorizer

func (*PasswordSecretAuthorizer) Authorize added in v0.5.0

func (a *PasswordSecretAuthorizer) Authorize(ctx context.Context, msg AuthRequest) (bool, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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