Go to the source code of this file.
◆ pg_start_oauthbearer()
Definition at line 3078 of file oauth-curl.c.
3079{
3083
3084
3086
3088 return -1;
3089
3090
3091
3092
3093
3094
3098
3101
3102
3103
3104
3105
3106
3110
3111
3112
3113
3114
3118
3119
3121 if (!conninfo)
3123
3125 {
3126 if (!opt->val)
3127 continue;
3128
3129 if (
strcmp(opt->keyword,
"oauth_client_id") == 0)
3130 {
3132 if (!
actx->client_id)
3134 }
3135 else if (
strcmp(opt->keyword,
"oauth_client_secret") == 0)
3136 {
3138 if (!
actx->client_secret)
3140 }
3141 else if (
strcmp(opt->keyword,
"oauth_ca_file") == 0)
3142 {
3146 }
3147 }
3148
3151
3152 actx->discovery_uri =
request->v1.openid_configuration;
3155
3159
3161 {
3163 return -1;
3164 }
3165
3167 {
3169 return -1;
3170 }
3171
3172 return 0;
3173
3175 if (conninfo)
3177
3179 return -1;
3180}
#define Assert(condition)
PQconninfoOption * PQconninfo(PGconn *conn)
void PQconninfoFree(PQconninfoOption *connOptions)
static bool setup_multiplexer(struct async_ctx *actx)
static bool initialize_curl(PGoauthBearerRequestV2 *req, uint32 debug_flags)
static void append_actx_error(PGoauthBearerRequestV2 *req, struct async_ctx *actx)
static PostgresPollingStatusType pg_fe_run_oauth_flow(PGconn *conn, struct PGoauthBearerRequest *request, int *altsock)
static void pg_fe_cleanup_oauth_flow(PGconn *conn, PGoauthBearerRequest *request)
static bool setup_curl_handles(struct async_ctx *actx)
static uint32 oauth_parse_debug_flags(void)
void initPQExpBuffer(PQExpBuffer str)
References append_actx_error(), Assert, calloc, conn, async_ctx::debug_flags, fb(), initialize_curl(), initPQExpBuffer(), _PQconninfoOption::keyword, libpq_gettext, oauth_parse_debug_flags(), pg_fe_cleanup_oauth_flow(), pg_fe_run_oauth_flow(), PGINVALID_SOCKET, PQconninfo(), PQconninfoFree(), setup_curl_handles(), and setup_multiplexer().