Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
authserv
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
ai
authserv
Commits
c94db039
Commit
c94db039
authored
10 years ago
by
ale
Browse files
Options
Downloads
Patches
Plain Diff
add docstrings
parent
e067d5b3
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pam/auth_client.h
+47
-0
47 additions, 0 deletions
pam/auth_client.h
with
47 additions
and
0 deletions
pam/auth_client.h
+
47
−
0
View file @
c94db039
...
...
@@ -16,14 +16,61 @@ typedef struct auth_client* auth_client_t;
#define auth_client_err_to_curl(e) (-(e)+(AC_ERR_CURL_BASE))
#define auth_client_err_from_curl(e) ((AC_ERR_CURL_BASE)-(e))
/*
* Create a new auth client instance.
*
* @param service Service name
* @param servers A comma-separated list of host:port auth server
* addresses
*/
auth_client_t
auth_client_new
(
const
char
*
service
,
const
char
*
servers
);
/*
* Free all resources associated with an auth client instance.
*/
void
auth_client_free
(
auth_client_t
ac
);
/*
* Return a human readable error string.
*
* @param err Error code returned by one of the auth_client_* methods
*/
const
char
*
auth_client_strerror
(
int
err
);
/*
* Set request verbosity.
*
* If verbose is set to 1, libcurl will dump the outbound requests to
* standard error.
*
* @param ac Auth client
* @param verbose Verbosity: 1 to enable, 0 to disable
*/
void
auth_client_set_verbose
(
auth_client_t
ac
,
int
verbose
);
/*
* Set up SSL credentials, and enable HTTPS.
*
* @param ac Auth client
* @param ca_file Path to the CA certificate (PEM format)
* @param crt_file Path to the client certificate (PEM format)
* @param key_file Path to the client certificate key
*/
int
auth_client_set_certificate
(
auth_client_t
ac
,
const
char
*
ca_file
,
const
char
*
crt_file
,
const
char
*
key_file
);
/*
* Authenticate a user.
*
* @param ac Auth client
* @param username Username
* @param password Password
* @param otp_token OTP token, if present (as a string)
* @param source_ip Source IP of the user, where available
* @param shard Shard identifier (as a string)
*/
int
auth_client_authenticate
(
auth_client_t
ac
,
const
char
*
username
,
const
char
*
password
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment