mirror of
https://github.com/Yubico/yubico-pam.git
synced 2025-04-10 14:02:25 +02:00
Add new parameter 'url' to specify the server template URL.
This commit is contained in:
parent
c4cd8e1086
commit
3338b6eb0c
2
NEWS
2
NEWS
@ -1,5 +1,7 @@
|
|||||||
Version 1.8 (unreleased)
|
Version 1.8 (unreleased)
|
||||||
|
|
||||||
|
* Add new parameter 'url' to specify the server template URL.
|
||||||
|
|
||||||
Version 1.7 (released 2008-09-01)
|
Version 1.7 (released 2008-09-01)
|
||||||
|
|
||||||
* Support two-factor mode to provide a password.
|
* Support two-factor mode to provide a password.
|
||||||
|
3
README
3
README
@ -95,6 +95,9 @@ Supported PAM module parameters are:
|
|||||||
"debug": to enable debug output to stdout,
|
"debug": to enable debug output to stdout,
|
||||||
"alwaysok": to enable that all authentication attempts should succeed
|
"alwaysok": to enable that all authentication attempts should succeed
|
||||||
(aka presentation mode).
|
(aka presentation mode).
|
||||||
|
"url": specify the URL template to use, this is set by calling
|
||||||
|
yubikey_client_set_url_template, which uses by default:
|
||||||
|
http://api.yubico.com/wsapi/verify?id=%d&otp=%s
|
||||||
}}}
|
}}}
|
||||||
|
|
||||||
If you are using "debug" you may find it useful to create a
|
If you are using "debug" you may find it useful to create a
|
||||||
|
@ -188,6 +188,7 @@ pam_sm_authenticate (pam_handle_t * pamh,
|
|||||||
const char *token_id[TOKEN_ID_LEN + 1] = { 0 };
|
const char *token_id[TOKEN_ID_LEN + 1] = { 0 };
|
||||||
char *token_otp_with_password = NULL;
|
char *token_otp_with_password = NULL;
|
||||||
char *token_password = NULL;
|
char *token_password = NULL;
|
||||||
|
char *url_template = NULL;
|
||||||
int password_len = 0;
|
int password_len = 0;
|
||||||
int valid_token = 0;
|
int valid_token = 0;
|
||||||
int i;
|
int i;
|
||||||
@ -210,6 +211,8 @@ pam_sm_authenticate (pam_handle_t * pamh,
|
|||||||
alwaysok = 1;
|
alwaysok = 1;
|
||||||
if (strncmp (argv[i], "authfile=", 9) == 0)
|
if (strncmp (argv[i], "authfile=", 9) == 0)
|
||||||
auth_file = (char *) argv[i] + 9;
|
auth_file = (char *) argv[i] + 9;
|
||||||
|
if (strncmp (argv[i], "url=", 4) == 0)
|
||||||
|
url_template = (char *) argv[i] + 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
@ -296,6 +299,9 @@ pam_sm_authenticate (pam_handle_t * pamh,
|
|||||||
|
|
||||||
yubikey_client_set_info (ykc, id, 0, NULL);
|
yubikey_client_set_info (ykc, id, 0, NULL);
|
||||||
|
|
||||||
|
if (url_template)
|
||||||
|
yubikey_client_set_url_template (ykc, url_template);
|
||||||
|
|
||||||
/* user will enter there system paasword followed by generated OTP */
|
/* user will enter there system paasword followed by generated OTP */
|
||||||
token_otp_with_password = (char *) password;
|
token_otp_with_password = (char *) password;
|
||||||
password_len = strlen (token_otp_with_password);
|
password_len = strlen (token_otp_with_password);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user