grpcauth

package
v1.4.5 Latest Latest
Warning

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

Go to latest
Published: May 19, 2020 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InterceptAPIKey added in v0.17.0

func InterceptAPIKey(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error)

InterceptAPIKey reads apikey from requests and puts the value into the context.

func NewAPIKeyInterceptor

func NewAPIKeyInterceptor() grpc.UnaryServerInterceptor

NewAPIKeyInterceptor creates instance of apikey interceptor

Types

type DeprecatedAPIKeyCredentials added in v0.22.0

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

DeprecatedAPIKeyCredentials implements grpc/credentials.PerRPCCredentials for authenticating with the grpc server. This does not work with drpc.

func NewDeprecatedAPIKeyCredentials added in v0.22.0

func NewDeprecatedAPIKeyCredentials(apikey string) *DeprecatedAPIKeyCredentials

NewDeprecatedAPIKeyCredentials returns a new DeprecatedAPIKeyCredentials

func (*DeprecatedAPIKeyCredentials) GetRequestMetadata added in v0.22.0

func (creds *DeprecatedAPIKeyCredentials) GetRequestMetadata(ctx context.Context, uri ...string) (map[string]string, error)

GetRequestMetadata gets the current request metadata, refreshing tokens if required.

func (*DeprecatedAPIKeyCredentials) RequireTransportSecurity added in v0.22.0

func (creds *DeprecatedAPIKeyCredentials) RequireTransportSecurity() bool

RequireTransportSecurity indicates whether the credentials requires transport security.

Jump to

Keyboard shortcuts

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