auth

package
v2.8.0-dev.57be8305 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewOAuthClient

func NewOAuthClient(ctx context.Context, oauthConfig OauthCredentials) *http.Client

NewOAuthClient creates a new HTTP client that supports OAuth2 client credentials based authorization

func NewTokenAuthClient

func NewTokenAuthClient(token string) *http.Client

NewTokenAuthClient creates a new HTTP client that supports token based authorization

Types

type OauthCredentials

type OauthCredentials struct {
	ClientID     string
	ClientSecret string
	TokenURL     string
	Scopes       []string
}

OauthCredentials holds information for authenticating to Dynatrace using Oauth2.0 client credential flow

type TokenAuthTransport

type TokenAuthTransport struct {
	http.RoundTripper
	// contains filtered or unexported fields
}

TokenAuthTransport should be used to enable a client to use dynatrace token authorization

func NewTokenAuthTransport

func NewTokenAuthTransport(baseTransport http.RoundTripper, token string) *TokenAuthTransport

NewTokenAuthTransport creates a new http transport to be used for token authorization

func (*TokenAuthTransport) RoundTrip

func (t *TokenAuthTransport) RoundTrip(req *http.Request) (*http.Response, error)

Jump to

Keyboard shortcuts

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