auth

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2022 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(authenticator Authenticator) *http.Client

func NewClientWithToken

func NewClientWithToken(token string) *http.Client

func NewClientWithTransport

func NewClientWithTransport(authenticator Authenticator, transport http.RoundTripper) *http.Client

Types

type ApplicationTokenAuthenticator

type ApplicationTokenAuthenticator struct {
	Token string
}

func (ApplicationTokenAuthenticator) GetToken

type Authenticator

type Authenticator interface {
	GetToken() string
}

type Transport

type Transport struct {
	Authenticator Authenticator
	Base          http.RoundTripper
}

func (*Transport) RoundTrip

func (t *Transport) RoundTrip(request *http.Request) (*http.Response, error)

Jump to

Keyboard shortcuts

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