auth

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2024 License: Apache-2.0 Imports: 3 Imported by: 5

Documentation

Overview

Package auth simplifies creating token and oAuth authenticated http.Client for use with rest.Client

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewOAuthBasedClient

func NewOAuthBasedClient(ctx context.Context, credentials clientcredentials.Config) *http.Client

NewOAuthBasedClient creates a new HTTP client with OAuth2 client credentials authentication. It takes a context and a clientcredentials.Config as arguments and returns an instance of *http.Client. The client credentials are used to authenticate requests made by the returned HTTP client.

func NewTokenBasedClient

func NewTokenBasedClient(token string) *http.Client

NewTokenBasedClient creates a new HTTP client with token-based authentication. It takes a token string as an argument and returns an instance of *http.Client.

Types

This section is empty.

Jump to

Keyboard shortcuts

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