security

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const PKCEInvalidCodeChallengeError = "code challenge does not match previously saved code verifier"
View Source
const PKCEInvalidCodeMethodError = "code challenge method not supported"

Variables

View Source
var Client *http.Client

Functions

func GetCaptchaURL

func GetCaptchaURL(captchaProvider string) (string, error)

func VerifyPKCEChallenge

func VerifyPKCEChallenge(codeChallenge, codeChallengeMethod, codeVerifier string) error

VerifyPKCEChallenge performs PKCE verification using the provided challenge, method, and verifier This is a shared utility function used by both FlowState and OAuthServerAuthorization

Types

type GotrueRequest

type GotrueRequest struct {
	Security GotrueSecurity `json:"gotrue_meta_security"`
}

type GotrueSecurity

type GotrueSecurity struct {
	Token string `json:"captcha_token"`
}

type VerificationResponse

type VerificationResponse struct {
	Success    bool     `json:"success"`
	ErrorCodes []string `json:"error-codes"`
	Hostname   string   `json:"hostname"`
}

func VerifyRequest

func VerifyRequest(requestBody *GotrueRequest, clientIP, secretKey, captchaProvider string) (VerificationResponse, error)

Jump to

Keyboard shortcuts

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