auth

package
v0.0.0-...-ec6bfc9 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2016 License: MIT Imports: 5 Imported by: 0

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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