api

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2022 License: Apache-2.0 Imports: 9 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultGrpcDialOptions

func DefaultGrpcDialOptions(hostport string, s UsesAuthorizer, additionalOpts ...grpc.DialOption) (opts []grpc.DialOption)

DefaultGrpcDialOptions returns a set of sensible default list of grpc.DialOption values. It includes transport credentials and configures per-RPC credentials using an authorizer, if one is configured.

Types

type Authorizer

type Authorizer interface {
	credentials.PerRPCCredentials
	oauth2.TokenSource
}

Authorizer represents an interface which provides a token used for authenticating a client in server-client communication. More specifically, this interfaces requires credentials.PerRPCCredentials, which enables this to be used by a gRPC client to communicate with a gRPC server that requires per-RPC credentials.

func NewOAuthAuthorizerFromClientCredentials

func NewOAuthAuthorizerFromClientCredentials(config *clientcredentials.Config) Authorizer

NewOAuthAuthorizerFromClientCredentials creates a new authorizer based on an OAuth 2.0 client credentials.

func NewOAuthAuthorizerFromConfig

func NewOAuthAuthorizerFromConfig(config *oauth2.Config, token *oauth2.Token) Authorizer

NewOAuthAuthorizerFromConfig creates a new authorizer based on an OAuth 2.0 config.

type UsesAuthorizer

type UsesAuthorizer interface {
	SetAuthorizer(auth Authorizer)
	Authorizer() Authorizer
}

UsesAuthorizer is an interface to denote that a struct is willing to accept and use an Authorizer

Directories

Path Synopsis
Package assessment is a reverse proxy.
Package assessment is a reverse proxy.
Package discovery is a reverse proxy.
Package discovery is a reverse proxy.
Package evidence is a reverse proxy.
Package evidence is a reverse proxy.
Package orchestrator is a reverse proxy.
Package orchestrator is a reverse proxy.

Jump to

Keyboard shortcuts

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