authentication

package
v6.47.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2019 License: Apache-2.0 Imports: 12 Imported by: 200

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrPreventRedirect = errors.New("prevent-redirect")

Functions

This section is empty.

Types

type LoginResource

type LoginResource struct {
	Prompts map[string][]string
	Links   map[string]string
}

type Repository

type Repository interface {
	net.RequestDumperInterface

	RefreshAuthToken() (updatedToken string, apiErr error)
	RefreshToken(token string) (updatedToken string, apiErr error)
	Authenticate(credentials map[string]string) (apiErr error)
	Authorize(token string) (string, error)
	GetLoginPromptsAndSaveUAAServerURL() (map[string]coreconfig.AuthPrompt, error)
}

type TokenRefresher

type TokenRefresher interface {
	RefreshAuthToken() (updatedToken string, apiErr error)
}

type UAARepository

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

func NewUAARepository

func NewUAARepository(gateway net.Gateway, config coreconfig.ReadWriter, dumper net.RequestDumper) UAARepository

func (UAARepository) Authenticate

func (uaa UAARepository) Authenticate(credentials map[string]string) error

func (UAARepository) Authorize

func (uaa UAARepository) Authorize(token string) (string, error)

func (UAARepository) DumpRequest

func (uaa UAARepository) DumpRequest(req *http.Request)

func (UAARepository) DumpResponse

func (uaa UAARepository) DumpResponse(res *http.Response)

func (UAARepository) GetLoginPromptsAndSaveUAAServerURL

func (uaa UAARepository) GetLoginPromptsAndSaveUAAServerURL() (prompts map[string]coreconfig.AuthPrompt, apiErr error)

func (UAARepository) RefreshAuthToken

func (uaa UAARepository) RefreshAuthToken() (string, error)

func (UAARepository) RefreshToken

func (uaa UAARepository) RefreshToken(t string) (string, error)

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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