auth

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const KeyBasic = "basic"

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth struct {
	Type   string `json:"type"`
	Config Config `json:"config"`
}

func NewBasic

func NewBasic(user string, pass string, showPass bool) *Auth

func (*Auth) Clone

func (a *Auth) Clone() *Auth

func (*Auth) GetBasic

func (a *Auth) GetBasic() (string, string)

func (*Auth) IsBasic

func (a *Auth) IsBasic() bool

func (*Auth) Merge

func (a *Auth) Merge(data npncore.Data, logger *logrus.Logger) *Auth

func (*Auth) String

func (a *Auth) String() string

func (*Auth) UnmarshalJSON

func (a *Auth) UnmarshalJSON(data []byte) error

type Basic

type Basic struct {
	Username     string `json:"username"`
	Password     string `json:"password,omitempty"`
	ShowPassword bool   `json:"showPassword,omitempty"`
}

func (*Basic) Clone

func (b *Basic) Clone() *Auth

func (*Basic) GetType

func (b *Basic) GetType() string

func (*Basic) String

func (b *Basic) String() string

type Config

type Config interface {
	GetType() string
	String() string
	Clone() *Auth
}

Jump to

Keyboard shortcuts

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