PostgreSQL Source Code git master
Loading...
Searching...
No Matches
fe-auth-oauth.h File Reference
#include "fe-auth-sasl.h"
#include "libpq-fe.h"
Include dependency graph for fe-auth-oauth.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  fe_oauth_state
 

Enumerations

enum  fe_oauth_step { FE_OAUTH_INIT , FE_OAUTH_BEARER_SENT , FE_OAUTH_REQUESTING_TOKEN , FE_OAUTH_SERVER_ERROR }
 

Functions

void pqClearOAuthToken (PGconn *conn)
 
bool oauth_unsafe_debugging_enabled (void)
 
bool use_builtin_flow (PGconn *conn, fe_oauth_state *state)
 

Variables

const pg_fe_sasl_mech pg_oauth_mech
 

Enumeration Type Documentation

◆ fe_oauth_step

Enumerator
FE_OAUTH_INIT 
FE_OAUTH_BEARER_SENT 
FE_OAUTH_REQUESTING_TOKEN 
FE_OAUTH_SERVER_ERROR 

Definition at line 22 of file fe-auth-oauth.h.

23{
28};
@ FE_OAUTH_REQUESTING_TOKEN
@ FE_OAUTH_SERVER_ERROR
@ FE_OAUTH_INIT
@ FE_OAUTH_BEARER_SENT

Function Documentation

◆ oauth_unsafe_debugging_enabled()

bool oauth_unsafe_debugging_enabled ( void  )
extern

Definition at line 149 of file oauth-utils.c.

150{
151 const char *env = getenv("PGOAUTHDEBUG");
152
153 return (env && strcmp(env, "UNSAFE") == 0);
154}
static int fb(int x)

References fb().

Referenced by issuer_from_well_known_uri(), and pg_fe_run_oauth_flow_impl().

◆ pqClearOAuthToken()

void pqClearOAuthToken ( PGconn conn)
extern

Definition at line 1385 of file fe-auth-oauth.c.

1386{
1387 if (!conn->oauth_token)
1388 return;
1389
1393}
void explicit_bzero(void *buf, size_t len)
#define free(a)
PGconn * conn
Definition streamutil.c:52
char * oauth_token
Definition libpq-int.h:446

References conn, explicit_bzero(), fb(), free, and pg_conn::oauth_token.

Referenced by pqClosePGconn(), and PQconnectPoll().

◆ use_builtin_flow()

bool use_builtin_flow ( PGconn conn,
fe_oauth_state state 
)
extern

Definition at line 781 of file fe-auth-oauth.c.

782{
783 return false;
784}

Referenced by setup_token_request().

Variable Documentation

◆ pg_oauth_mech

const pg_fe_sasl_mech pg_oauth_mech
extern

Definition at line 40 of file fe-auth-oauth.c.

40 {
45};
static SASLStatus oauth_exchange(void *opaq, bool final, char *input, int inputlen, char **output, int *outputlen)
static bool oauth_channel_bound(void *opaq)
static void oauth_free(void *opaq)
static void * oauth_init(PGconn *conn, const char *password, const char *sasl_mechanism)

Referenced by pg_SASL_init(), pqConnectOptions2(), and PQconnectPoll().