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)
 

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 82 of file oauth-utils.c.

83{
84 const char *env = getenv("PGOAUTHDEBUG");
85
86 return (env && strcmp(env, "UNSAFE") == 0);
87}
static int fb(int x)

References fb().

Referenced by issuer_from_well_known_uri(), and pg_start_oauthbearer().

◆ pqClearOAuthToken()

void pqClearOAuthToken ( PGconn conn)
extern

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

1412{
1413 if (!conn->oauth_token)
1414 return;
1415
1419}
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().

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().