internal

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AsertoTenantID  string = "aserto-tenant-id"
	AsertoAccountID string = "aserto-account-id"
	AsertoSessionID string = "aserto-session-id"
	Authorization   string = "authorization"
	Basic           string = "basic"
	Bearer          string = "bearer"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type APIKeyAuth

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

APIKeyAuth API key based authentication.

It implements the interface credentials.PerRPCCredentials.

func NewAPIKeyAuth

func NewAPIKeyAuth(key string) *APIKeyAuth

func (*APIKeyAuth) GetRequestMetadata

func (k *APIKeyAuth) GetRequestMetadata(ctx context.Context, in ...string) (map[string]string, error)

func (*APIKeyAuth) RequireTransportSecurity

func (k *APIKeyAuth) RequireTransportSecurity() bool

type TokenAuth

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

TokenAuth bearer token based authentication.

It implements the interface credentials.PerRPCCredentials.

func NewTokenAuth

func NewTokenAuth(token string) *TokenAuth

func (TokenAuth) GetRequestMetadata

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

func (TokenAuth) RequireTransportSecurity

func (TokenAuth) RequireTransportSecurity() bool

Jump to

Keyboard shortcuts

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