pkce

package
v0.0.0-...-365054f Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChallengeSHA256

func ChallengeSHA256(verifier string) string

ChallengeSHA256 generate codeChallenge from codeVerifier using sha256 also encodes it base64 https://www.rfc-editor.org/rfc/rfc7636#section-4.2

func CodeVerifier

func CodeVerifier(l uint) (string, error)

CodeVerifier creates a codeVerifier https://www.rfc-editor.org/rfc/rfc7636#section-4.1 using rand.Reader code verifier is generated from subset of [A-Z] / [a-z] / [0-9]

Types

type Info

type Info struct {
	CodeVerifier  string
	CodeChallenge string
}

Info contains codeVerifier and codeChallenge

func New

func New(l uint) (Info, error)

New returns a new set of codeVerifier and codeChallenge https://www.rfc-editor.org/rfc/rfc7636

func (Info) Base64URLCodeVerifier

func (info Info) Base64URLCodeVerifier() string

Base64URLCodeVerifier encode to base64url for transport

Jump to

Keyboard shortcuts

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