auth

package
v0.0.0-...-e1e1857 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package auth provides the token and roundtripper for bearer based authentication.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BearerTokenRoundTripper

type BearerTokenRoundTripper struct {
	TraceID string
	// contains filtered or unexported fields
}

func (*BearerTokenRoundTripper) RoundTrip

func (r *BearerTokenRoundTripper) RoundTrip(req *http.Request) (*http.Response, error)

type FileToken

type FileToken struct {
	// contains filtered or unexported fields
}

func NewFileToken

func NewFileToken(file string) *FileToken

func (*FileToken) Get

func (t *FileToken) Get() (string, error)

type StaticToken

type StaticToken struct {
	// contains filtered or unexported fields
}

func NewNoOpTokenProvider

func NewNoOpTokenProvider() *StaticToken

func NewStaticToken

func NewStaticToken(token string) *StaticToken

func (*StaticToken) Get

func (t *StaticToken) Get() (string, error)

type TokenProvider

type TokenProvider interface {
	Get() (string, error)
}

Jump to

Keyboard shortcuts

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