Help us shape the future of Go! Take the 2026 Go Developer Survey

pkce

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TransformationPlain = Method("plain")
	TransformationS256  = Method("S256")
)

Defines for the possible Method

Variables

This section is empty.

Functions

This section is empty.

Types

type Method

type Method string

Method is a type for the code challenge methods

func (Method) String

func (m Method) String() string

type PKCE

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

PKCE is a type holding the information for a PKCE flow

func NewPKCE

func NewPKCE(verifier string, method Method) *PKCE

NewPKCE creates a new PKCE for the passed verifier and Method

func NewS256PKCE

func NewS256PKCE(verifier string) *PKCE

NewS256PKCE creates a new PKCE for the passed verifier and the Method TransformationS256

func (*PKCE) Challenge

func (pkce *PKCE) Challenge() (string, error)

Challenge returns the code_challenge according to the defined Method

func (PKCE) MarshalMsgpack

func (pkce PKCE) MarshalMsgpack() ([]byte, error)

MarshalMsgpack implements the msgpack.Marshaler interface

func (PKCE) Method

func (pkce PKCE) Method() Method

func (*PKCE) UnmarshalMsgpack

func (pkce *PKCE) UnmarshalMsgpack(data []byte) error

UnmarshalMsgpack implements the msgpack.Unmarshaler interface

func (PKCE) Verifier

func (pkce PKCE) Verifier() string

Verifier returns the code_verifier

Jump to

Keyboard shortcuts

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