Documentation ¶
Index ¶
Constants ¶
View Source
const UnreservedCharacters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~"
UnreservedCharacters
unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~".
Variables ¶
View Source
var ErrCodeVerifierLength = errors.New("pkce: code verifier length must be between 43 and 128")
Functions ¶
This section is empty.
Types ¶
type CodeChallengeMethod ¶
type CodeChallengeMethod string
const ( // CodeChallengeMethodPlainShouldNotBeUsed // // Clients are permitted to use "plain" only if they cannot support // "S256" for some technical reason and know via out-of-band // configuration that the server supports "plain". // // ref. https://www.rfc-editor.org/rfc/rfc7636#section-4.2 CodeChallengeMethodPlainShouldNotBeUsed CodeChallengeMethod = "plain" // CodeChallengeMethodS256 // // If the client is capable of using "S256", it MUST use "S256", as // "S256" is Mandatory To Implement (MTI) on the server. // // code_challenge = BASE64URL-ENCODE(SHA256(ASCII(code_verifier))) // // ref. https://www.rfc-editor.org/rfc/rfc7636#section-4.2 CodeChallengeMethodS256 CodeChallengeMethod = "S256" )
func (CodeChallengeMethod) String ¶
func (c CodeChallengeMethod) String() string
type CodeVerifier ¶
type CodeVerifier string
func CreateCodeVerifier ¶
func CreateCodeVerifier(length int) (CodeVerifier, error)
func (CodeVerifier) Encode ¶
func (c CodeVerifier) Encode(method CodeChallengeMethod) string
Click to show internal directories.
Click to hide internal directories.