Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit03366b6

Browse files
oauth: Fix incorrect const markers in struct
Two members in PGoauthBearerRequest were incorrectly marked as const.While in there, align the name of the struct with the typedef as perproject style.Reported-by: Tom Lane <tgl@sss.pgh.pa.us>Discussion:https://postgr.es/m/912516.1740329361@sss.pgh.pa.us
1 parentbfe56cd commit03366b6

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

‎doc/src/sgml/libpq.sgml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10318,21 +10318,21 @@ typedef struct _PGpromptOAuthDevice
1031810318
of <symbol>PGoauthBearerRequest</symbol>, which should be filled in
1031910319
by the implementation:
1032010320
<synopsis>
10321-
typedef struct_PGoauthBearerRequest
10321+
typedef structPGoauthBearerRequest
1032210322
{
1032310323
/* Hook inputs (constant across all calls) */
10324-
const char *constopenid_configuration; /* OIDC discovery URL */
10325-
const char *constscope; /* required scope(s), or NULL */
10324+
const char *openid_configuration; /* OIDC discovery URL */
10325+
const char *scope; /* required scope(s), or NULL */
1032610326

1032710327
/* Hook outputs */
1032810328

1032910329
/* Callback implementing a custom asynchronous OAuth flow. */
1033010330
PostgresPollingStatusType (*async) (PGconn *conn,
10331-
struct_PGoauthBearerRequest *request,
10331+
structPGoauthBearerRequest *request,
1033210332
SOCKTYPE *altsock);
1033310333

1033410334
/* Callback to clean up custom allocations. */
10335-
void (*cleanup) (PGconn *conn, struct_PGoauthBearerRequest *request);
10335+
void (*cleanup) (PGconn *conn, structPGoauthBearerRequest *request);
1033610336

1033710337
char *token; /* acquired Bearer token */
1033810338
void *user; /* hook-defined allocated data */

‎src/interfaces/libpq/libpq-fe.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -745,11 +745,11 @@ typedef struct _PGpromptOAuthDevice
745745
#defineSOCKTYPE int
746746
#endif
747747

748-
typedefstruct_PGoauthBearerRequest
748+
typedefstructPGoauthBearerRequest
749749
{
750750
/* Hook inputs (constant across all calls) */
751-
constchar*constopenid_configuration;/* OIDC discovery URI */
752-
constchar*constscope;/* required scope(s), or NULL */
751+
constchar*openid_configuration;/* OIDC discovery URI */
752+
constchar*scope;/* required scope(s), or NULL */
753753

754754
/* Hook outputs */
755755

@@ -770,7 +770,7 @@ typedef struct _PGoauthBearerRequest
770770
* request->token must be set by the hook.
771771
*/
772772
PostgresPollingStatusType (*async) (PGconn*conn,
773-
struct_PGoauthBearerRequest*request,
773+
structPGoauthBearerRequest*request,
774774
SOCKTYPE*altsock);
775775

776776
/*
@@ -780,7 +780,7 @@ typedef struct _PGoauthBearerRequest
780780
* This is technically optional, but highly recommended, because there is
781781
* no other indication as to when it is safe to free the token.
782782
*/
783-
void(*cleanup) (PGconn*conn,struct_PGoauthBearerRequest*request);
783+
void(*cleanup) (PGconn*conn,structPGoauthBearerRequest*request);
784784

785785
/*
786786
* The hook should set this to the Bearer token contents for the

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp