oauthsrc

package
v0.0.0-...-948650a Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package oauthsrc implements sourcing of OAuth2 tokens.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHTTP

func NewHTTP(method, tokenURL, body string, emptyJSONToken Tokener) oauth2.TokenSource

NewHTTP returns an HTTP token source that fetches tokens from the tokenURL with the specified HTTP method and request body. The request body will be unmarshalled into a new instance of emptyJSONToken, created via reflection.

Types

type Tokener

type Tokener interface {
	AsToken() *oauth2.Token
}

A Tokener can be converted into an oauth2.Token. This allows for sources that need to be unmarshalled into arbitrary types.

Jump to

Keyboard shortcuts

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