2 Chapter 50. OAuth Validator Modules
6 50.1. Safely Designing a Validator Module
8 50.1.1. Validator Responsibilities
9 50.1.2. General Coding Guidelines
10 50.1.3. Authorizing Users (Usermap Delegation)
12 50.2. Initialization Functions
13 50.3. OAuth Validator Callbacks
15 50.3.1. Startup Callback
16 50.3.2. Validate Callback
17 50.3.3. Shutdown Callback
19 PostgreSQL provides infrastructure for creating custom modules to
20 perform server-side validation of OAuth bearer tokens. Because OAuth
21 implementations vary so wildly, and bearer token validation is heavily
22 dependent on the issuing party, the server cannot check the token
23 itself; validator modules provide the integration layer between the
24 server and the OAuth provider in use.
26 OAuth validator modules must at least consist of an initialization
27 function (see Section 50.2) and the required callback for performing
28 validation (see Section 50.3.2).
32 Since a misbehaving validator might let unauthorized users into the
33 database, correct implementation is crucial for server safety. See
34 Section 50.1 for design considerations.