basic

package
v0.0.0-...-ac6a2c4 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SecurityClient

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

SecurityClient returns token which authenticates internal communication when basic auth is enabled

func NewBasicSecurityClient

func NewBasicSecurityClient(configPath string) (*SecurityClient, error)

NewBasicSecurityClient returns SecurityClient

func (*SecurityClient) GetToken

func (c *SecurityClient) GetToken() auth.Token

GetToken returns a token for basic auth

type SecurityManager

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

SecurityManager uses Username and Password for auth

func NewBasicSecurityManager

func NewBasicSecurityManager(configPath string) (*SecurityManager, error)

NewBasicSecurityManager returns SecurityManager

func (*SecurityManager) Authenticate

func (m *SecurityManager) Authenticate(token auth.Token) (auth.User, error)

Authenticate authenticates a user, it expects to Accept UsernamePasswordToken

func (*SecurityManager) RedactToken

func (m *SecurityManager) RedactToken(token auth.Token)

RedactToken removes password info from the token

Jump to

Keyboard shortcuts

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