PostgreSQL Source Code git master
|
#include "postgres.h"
#include "fmgr.h"
#include "libpq/oauth.h"
#include "miscadmin.h"
#include "utils/guc.h"
#include "utils/memutils.h"
Go to the source code of this file.
Macros | |
#define | PRIVATE_COOKIE ((void *) 13579) |
Functions | |
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) |
void | _PG_init (void) |
const OAuthValidatorCallbacks * | _PG_oauth_validator_module_init (void) |
Variables | |
PG_MODULE_MAGIC | |
static const OAuthValidatorCallbacks | validator_callbacks |
static char * | authn_id = NULL |
static bool | authorize_tokens = true |
#define PRIVATE_COOKIE ((void *) 13579) |
Definition at line 87 of file validator.c.
void _PG_init | ( | void | ) |
Definition at line 56 of file validator.c.
References authn_id, authorize_tokens, DefineCustomBoolVariable(), DefineCustomStringVariable(), MarkGUCPrefixReserved(), and PGC_SIGHUP.
const OAuthValidatorCallbacks * _PG_oauth_validator_module_init | ( | void | ) |
Definition at line 82 of file validator.c.
References validator_callbacks.
|
static |
Definition at line 122 of file validator.c.
References ValidatorModuleResult::authn_id, authn_id, authorize_tokens, ValidatorModuleResult::authorized, elog, ERROR, Port::hba, LOG, MyProcPort, HbaLine::oauth_issuer, HbaLine::oauth_scope, PRIVATE_COOKIE, and pstrdup().
|
static |
Definition at line 109 of file validator.c.
References elog, PANIC, and PRIVATE_COOKIE.
|
static |
Definition at line 93 of file validator.c.
References elog, ERROR, and PRIVATE_COOKIE.
|
static |
Definition at line 41 of file validator.c.
Referenced by _PG_init(), InitializeSystemUser(), RestoreClientConnectionInfo(), and validate_token().
|
static |
Definition at line 42 of file validator.c.
Referenced by _PG_init(), and validate_token().
PG_MODULE_MAGIC |
Definition at line 22 of file validator.c.
|
static |
Definition at line 32 of file validator.c.
Referenced by _PG_oauth_validator_module_init().