76 "Authenticated identity to use for future connections",
84 "Should tokens be marked valid?",
92 "Error message to print during failures",
100 "Should the validator report an internal error?",
108 "Should the validator register an invalid option?",
128#define PRIVATE_COOKIE ((void *) 13579)
141 elog(
ERROR,
"oauth_validator: sversion set to %d",
state->sversion);
154 "oauth_validator: GetOAuthValidatorOption(\"%s\") was non-NULL during startup_cb",
161 const char *
invalid =
"bad option name";
177 elog(
PANIC,
"oauth_validator: private state cookie changed to %p in shutdown",
178 state->private_data);
187 const char *
token,
const char *role,
192 elog(
ERROR,
"oauth_validator: private state cookie changed to %p in validate",
193 state->private_data);
198 elog(
LOG,
"oauth_validator: token=\"%s\", role=\"%s\"",
token, role);
199 elog(
LOG,
"oauth_validator: issuer=\"%s\", scope=\"%s\"",
const char * GetOAuthHBAOption(const ValidatorModuleState *state, const char *optname)
void RegisterOAuthHBAOptions(ValidatorModuleState *state, int num, const char *opts[])
void DefineCustomStringVariable(const char *name, const char *short_desc, const char *long_desc, char **valueAddr, const char *bootValue, GucContext context, int flags, GucStringCheckHook check_hook, GucStringAssignHook assign_hook, GucShowHook show_hook)
void DefineCustomBoolVariable(const char *name, const char *short_desc, const char *long_desc, bool *valueAddr, bool bootValue, GucContext context, int flags, GucBoolCheckHook check_hook, GucBoolAssignHook assign_hook, GucShowHook show_hook)
void MarkGUCPrefixReserved(const char *className)
invalidindex index d is invalid
char * pstrdup(const char *in)
#define PG_OAUTH_VALIDATOR_MAGIC
ValidatorStartupCB startup_cb
const OAuthValidatorCallbacks * _PG_oauth_validator_module_init(void)
static bool internal_error
static char * error_detail
static bool authorize_tokens
static void validator_startup(ValidatorModuleState *state)
static void validator_shutdown(ValidatorModuleState *state)
static const OAuthValidatorCallbacks validator_callbacks
static bool validate_token(const ValidatorModuleState *state, const char *token, const char *role, ValidatorModuleResult *res)
static const char * hba_opts[]