providers

package
v0.0.0-...-0940abd Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type VerifyMyAgeProvider

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

VerifyMyAgeProvider struct to hold provider specific details

func NewVerifyMyAgeProvider

func NewVerifyMyAgeProvider(clientID, clientSecret, redirectURL string) *VerifyMyAgeProvider

NewVerifyMyAgeProvider creates a new VerifyMyAgeProvider with the given clientID, clientSecret, and redirectURL

func (*VerifyMyAgeProvider) AuthCodeURL

func (p *VerifyMyAgeProvider) AuthCodeURL(state string, opts ...oauth2.AuthCodeOption) string

AuthCodeURL generates the URL for the authorization endpoint

func (*VerifyMyAgeProvider) Client

func (p *VerifyMyAgeProvider) Client(ctx context.Context, token *oauth2.Token) *http.Client

Client returns an *http.Client configured with the provided token

func (*VerifyMyAgeProvider) Exchange

func (p *VerifyMyAgeProvider) Exchange(ctx context.Context, code string, opts ...oauth2.AuthCodeOption) (*oauth2.Token, error)

Exchange converts an authorization code into a token

func (*VerifyMyAgeProvider) UseSandbox

func (p *VerifyMyAgeProvider) UseSandbox()

UseSandbox switches the API base URLs to the sandbox environment

Jump to

Keyboard shortcuts

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