auth

package
Version: v0.0.0-...-e8f4e09 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2016 License: MIT Imports: 5 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider interface {
	Login(context.Context) (authToken string, err error)
	GetProviderString() string
	GetAccessToken() string
}

Provider is a common interface for managing auth tokens with the different third party authenticators

func NewProvider

func NewProvider(provider, username, password string) (Provider, error)

NewProvider creates a new provider based on the provider identifier

type UnknownProvider

type UnknownProvider struct {
}

UnknownProvider is a null provider for when a real one cannot be retrieved

func (*UnknownProvider) GetAccessToken

func (u *UnknownProvider) GetAccessToken() string

GetAccessToken will return an empty access token

func (*UnknownProvider) GetProviderString

func (u *UnknownProvider) GetProviderString() string

GetProviderString will return an identifying string for itself

func (*UnknownProvider) Login

func (u *UnknownProvider) Login(ctx context.Context) (string, error)

Login tries to log in

Source Files

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL