59 "Authenticated identity to use for future connections",
67 "Should tokens be marked valid?",
87#define PRIVATE_COOKIE ((void *) 13579)
99 if (
state->sversion != PG_VERSION_NUM)
100 elog(
ERROR,
"oauth_validator: sversion set to %d",
state->sversion);
113 elog(
PANIC,
"oauth_validator: private state cookie changed to %p in shutdown",
114 state->private_data);
123 const char *
token,
const char *role,
128 elog(
ERROR,
"oauth_validator: private state cookie changed to %p in validate",
129 state->private_data);
131 elog(
LOG,
"oauth_validator: token=\"%s\", role=\"%s\"",
token, role);
132 elog(
LOG,
"oauth_validator: issuer=\"%s\", scope=\"%s\"",
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)
char * pstrdup(const char *in)
#define PG_OAUTH_VALIDATOR_MAGIC
const OAuthValidatorCallbacks * _PG_oauth_validator_module_init(void)
static bool authorize_tokens
static void validator_startup(ValidatorModuleState *state)
static void validator_shutdown(ValidatorModuleState *state)
static bool validate_token(const ValidatorModuleState *state, const char *token, const char *role, ValidatorModuleResult *result)
static const OAuthValidatorCallbacks validator_callbacks