bearertoken

package
v0.8.93 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTokenAuth

func NewTokenAuth(token string, insecure bool) credentials.PerRPCCredentials

Implementation of PerRPCCredentials interface that sends a bearer token in each request.

Types

type TokenAuth

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

func (TokenAuth) GetRequestMetadata

func (t TokenAuth) GetRequestMetadata(ctx context.Context, in ...string) (map[string]string, error)

Return value is mapped to request headers.

func (TokenAuth) RequireTransportSecurity

func (t TokenAuth) RequireTransportSecurity() bool

Jump to

Keyboard shortcuts

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