auth

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2022 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 Authorizer

type Authorizer interface {
	Authorize(ctx context.Context, req dashv1alpha1.LoginRequest) (bool, error)
}

type HTTPAuthorizer

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

HTTPAuthorizer authorize with cosmo-dashboard login API

func NewHTTPAuthorizer

func NewHTTPAuthorizer(url string, ca []byte) *HTTPAuthorizer

func (*HTTPAuthorizer) Authorize

func (a *HTTPAuthorizer) Authorize(ctx context.Context, req dashv1alpha1.LoginRequest) (bool, error)

type KosmoSecretAuthorizer

type KosmoSecretAuthorizer struct {
	kosmo.Client
}

KosmoSecretAuthorizer authorize with cosmo user's password secret

func NewKosmoSecretAuthorizer

func NewKosmoSecretAuthorizer(c kosmo.Client) *KosmoSecretAuthorizer

func (*KosmoSecretAuthorizer) Authorize

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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