oauth2

package
v1.11.3 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2026 License: MIT Imports: 4 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateVerifier

func GenerateVerifier() string

GenerateVerifier generates a PKCE code verifier with 32 octets of randomness. This follows recommendations in RFC 7636.

A fresh verifier should be generated for each authorization. S256ChallengeOption(verifier) should then be passed to Config.AuthCodeURL and VerifierOption(verifier) to Config.Exchange.

func S256ChallengeFromVerifier

func S256ChallengeFromVerifier(verifier string) string

S256ChallengeFromVerifier returns a PKCE code challenge derived from verifier with method S256.

Prefer to use S256ChallengeOption where possible.

func S256ChallengeOption

func S256ChallengeOption(verifier string) []auth_code_option.AuthCodeOption

S256ChallengeOption returns AuthCodeOption values that set the PKCE code challenge and challenge method derived from verifier with method S256. The returned options should be passed to Config.AuthCodeURL only.

func VerifierOption

func VerifierOption(verifier string) auth_code_option.AuthCodeOption

VerifierOption returns a PKCE code verifier AuthCodeOption. It should be passed to Config.Exchange only.

Types

This section is empty.

Directories

Path Synopsis
types

Jump to

Keyboard shortcuts

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