pkce

package
v0.0.0-...-44a5619 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package pkce provides generation of the PKCE parameters. See also https://tools.ietf.org/html/rfc7636.

Index

Constants

View Source
const (
	// code challenge methods defined as https://tools.ietf.org/html/rfc7636#section-4.3
	MethodS256 = "S256"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Params

type Params struct {
	CodeChallenge       string
	CodeChallengeMethod string
	CodeVerifier        string
}

Params represents a set of the PKCE parameters.

var Plain Params

func New

func New(methods []string) (Params, error)

New returns a parameters supported by the provider. You need to pass the code challenge methods defined in RFC7636. It returns Plain if no method is available.

func NewS256

func NewS256() (Params, error)

NewS256 generates a parameters for S256.

func (Params) IsZero

func (p Params) IsZero() bool

Jump to

Keyboard shortcuts

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