Documentation
¶
Overview ¶
Package authattempt holds shared helpers for auth-attempt statement dialects.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChecksToJSON ¶
ChecksToJSON marshals domain checks into the create payload shape. ids must be one dialect-minted check id per check (same length as checks).
func MarshalPayloadJSON ¶
func MarshalPayloadJSON(payload any) (json.RawMessage, error)
MarshalPayloadJSON marshals a challenge or factor payload, returning nil when empty.
func MarshalPayloadString ¶
MarshalPayloadString marshals a payload to a Spanner JSON string pointer.
func SessionIDArg ¶
SessionIDArg converts an optional session ID string for SQL binding.
Types ¶
type CheckCreate ¶
type CheckCreate struct {
ID string `json:"id"`
Type uint8 `json:"type"`
ChallengePayload json.RawMessage `json:"challenge_payload,omitempty"`
FactorPayload json.RawMessage `json:"factor_payload,omitempty"`
IsChallenge bool `json:"is_challenge"`
IsFactor bool `json:"is_factor"`
}
CheckCreate is the JSON shape used when inserting checks alongside an attempt.
Click to show internal directories.
Click to hide internal directories.