auth

package
v0.0.0-...-7a09d4d Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2018 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 OAuth2Authenticator

type OAuth2Authenticator struct {
	Provider string `json:"provider"`
	Token    string `json:"access_token"`
}

OAuth2Authenticator allows chttp authentication with Flashback's OAuth2 middleware proxy.

func NewOAuth2

func NewOAuth2(provider, token string) *OAuth2Authenticator

NewOAuth2 returns a new kivik chttp authenticator based on the provided OAuth2 provider and token.

func (*OAuth2Authenticator) Authenticate

func (a *OAuth2Authenticator) Authenticate(ctx context.Context, client *chttp.Client) error

Authenticate attempts to authenticate with an OAuth2 token.

func (*OAuth2Authenticator) Logout

func (a *OAuth2Authenticator) Logout(ctx context.Context, client *chttp.Client) error

Logout logs out.

Jump to

Keyboard shortcuts

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