auth

package
v0.0.0-...-5eea81e Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authenticator

type Authenticator interface {
	Authenticate() (*http.Client, error)
}

func NewAuthenticator

func NewAuthenticator(key string, secret string,
	oauthClient OauthClient, ui UiAdapter) Authenticator

type OauthClient

type OauthClient interface {
	NewConsumer(key string, secret string, requestTokenUrl string,
		authorizeTokenUrl string, accessTokenUrl string) OauthConsumer
}

func NewOauthClient

func NewOauthClient() OauthClient

type OauthConsumer

type OauthConsumer interface {
	GetRequestTokenAndUrl(callbackUrl string) (rtoken *oauth.RequestToken,
		loginUrl string, err error)
	AuthorizeToken(rtoken *oauth.RequestToken, verificationCode string) (atoken *oauth.AccessToken, err error)
	SetAdditionalParams(params map[string]string)
	MakeHttpClient(token *oauth.AccessToken) (*http.Client, error)
}

type UiAdapter

type UiAdapter interface {
	PromptForAccessCode(url string) (string, error)
}

func NewConsoleUiAdapter

func NewConsoleUiAdapter() UiAdapter

Directories

Path Synopsis
This file was generated by counterfeiter
This file was generated by counterfeiter

Jump to

Keyboard shortcuts

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