go_oauth_pkce_code_verifier

package module
v0.0.0-...-4f9f17e Latest Latest
Warning

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

Go to latest
Published: May 10, 2022 License: MIT Imports: 6 Imported by: 61 modules, 54 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

go-oauth-pkce-code-verifier

OAuth PKCE code_verifier and code_challenge generator implimented golang.

How to use

// Create code_verifier
v := CreateCodeVerifier()
code_verifier := v.String()

// Create code_challenge with plain method
code_challenge := v.CodeChallengeS256()
code_challenge_method := "plain"

// Create code_challenge with S256 method
code_challenge := v.CodeChallengeS256()
code_challenge_method := "S256"

Documentation

Index

Constants

View Source
const (
	DefaultLength = 32
	MinLength     = 32
	MaxLength     = 96
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CodeVerifier

type CodeVerifier struct {
	Value string
}

func CreateCodeVerifier

func CreateCodeVerifier() (*CodeVerifier, error)

func CreateCodeVerifierFromBytes

func CreateCodeVerifierFromBytes(b []byte) (*CodeVerifier, error)

func CreateCodeVerifierWithLength

func CreateCodeVerifierWithLength(length int) (*CodeVerifier, error)

func (*CodeVerifier) CodeChallengePlain

func (v *CodeVerifier) CodeChallengePlain() string

func (*CodeVerifier) CodeChallengeS256

func (v *CodeVerifier) CodeChallengeS256() string

func (*CodeVerifier) String

func (v *CodeVerifier) String() string

Jump to

Keyboard shortcuts

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