pkce

package
v0.0.0-...-8cfd559 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidCodeVerifier = errors.New("code_verifier must be a string between 43 and 128 characters long using A-Z, a-z, 0-9, -, ., _, ~")

Functions

This section is empty.

Types

type CodeChallengeMethod

type CodeChallengeMethod = string
const CodeChallengeMethodS256 CodeChallengeMethod = "S256"

type Verifier

type Verifier struct {
	CodeChallengeMethod CodeChallengeMethod `json:"code_challenge_method"`
	CodeVerifier        string              `json:"code_verifier"`
}

func GenerateS256Verifier

func GenerateS256Verifier() *Verifier

func NewS256Verifier

func NewS256Verifier(codeVerifier string) (*Verifier, error)

func (*Verifier) Challenge

func (v *Verifier) Challenge() string

func (*Verifier) Verify

func (v *Verifier) Verify(challenge string) bool

Jump to

Keyboard shortcuts

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