Movatterモバイル変換


[0]ホーム

URL:


November 13, 2025: PostgreSQL 18.1, 17.7, 16.11, 15.15, 14.20, and 13.23 Released!
DocumentationPostgreSQL devel (2025-12-19 08:51:50 - git commit44f49511b79)
Supported Versions:Current (18)
Development Versions:devel
This documentation is for an unsupported version of PostgreSQL.
You may want to view the same page for thecurrent version, or one of the other supported versions listed above instead.
50.2. Initialization Functions
Prev UpChapter 50. OAuth Validator ModulesHome Next

50.2. Initialization Functions#

OAuth validator modules are dynamically loaded from the shared libraries listed inoauth_validator_libraries. Modules are loaded on demand when requested from a login in progress. The normal library search path is used to locate the library. To provide the validator callbacks and to indicate that the library is an OAuth validator module a function named_PG_oauth_validator_module_init must be provided. The return value of the function must be a pointer to a struct of typeOAuthValidatorCallbacks, which contains a magic number and pointers to the module's token validation functions. The returned pointer must be of server lifetime, which is typically achieved by defining it as astatic const variable in global scope.

typedef struct OAuthValidatorCallbacks{    uint32        magic;            /* must be set to PG_OAUTH_VALIDATOR_MAGIC */    ValidatorStartupCB startup_cb;    ValidatorShutdownCB shutdown_cb;    ValidatorValidateCB validate_cb;} OAuthValidatorCallbacks;typedef const OAuthValidatorCallbacks *(*OAuthValidatorModuleInit) (void);

Only thevalidate_cb callback is required, the others are optional.


Prev Up Next
50.1. Safely Designing a Validator Module Home 50.3. OAuth Validator Callbacks

[8]ページ先頭

©2009-2025 Movatter.jp