Repository Public
1package api23// AuthMode says which credentials an operation accepts.4type AuthMode int56const (7 AuthPublic AuthMode = iota // no credentials8 AuthSession // cookie session or bearer token9 AuthSetup // invitation setup transaction only10 AuthSessionOrSetup // either (passkey registration)11 AuthSessionAndSetup // both (linking an invitation to an existing account)12)1314// OpPolicy is the contract-declared security policy of one operation.15type OpPolicy struct {16 Method string17 Path string18 Auth AuthMode19 Permission string // empty: any authenticated user (or none for public/setup operations)20 StepUp bool // requires a recent passkey verification when called with a session21}22