Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
20709f81
Commit
20709f81
authored
Oct 26, 2010
by
Robert Haas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a client authentication hook.
KaiGai Kohei, with minor cleanup of the comments by me.
parent
1fea0c05
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
src/backend/libpq/auth.c
src/backend/libpq/auth.c
+9
-0
src/include/libpq/auth.h
src/include/libpq/auth.h
+4
-0
No files found.
src/backend/libpq/auth.c
View file @
20709f81
...
...
@@ -216,6 +216,12 @@ static int CheckRADIUSAuth(Port *port);
*----------------------------------------------------------------
*/
/*
* This hook allows plugins to get control following client authentication,
* but before the user has been informed about the results. It could be used
* to record login events, insert a delay after failed authentication, etc.
*/
ClientAuthentication_hook_type
ClientAuthentication_hook
=
NULL
;
/*
* Tell the user the authentication failed, but not (much about) why.
...
...
@@ -577,6 +583,9 @@ ClientAuthentication(Port *port)
break
;
}
if
(
ClientAuthentication_hook
)
(
*
ClientAuthentication_hook
)(
port
,
status
);
if
(
status
==
STATUS_OK
)
sendAuthRequest
(
port
,
AUTH_REQ_OK
);
else
...
...
src/include/libpq/auth.h
View file @
20709f81
...
...
@@ -24,4 +24,8 @@ extern char *pg_krb_realm;
extern
void
ClientAuthentication
(
Port
*
port
);
/* Hook for plugins to get control in ClientAuthentication() */
typedef
void
(
*
ClientAuthentication_hook_type
)(
Port
*
,
int
);
extern
PGDLLIMPORT
ClientAuthentication_hook_type
ClientAuthentication_hook
;
#endif
/* AUTH_H */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment