1
0
mirror of https://github.com/Yubico/yubico-pam.git synced 2025-01-31 16:52:19 +01:00

Add new parameter 'url' to specify the server template URL.

This commit is contained in:
Simon Josefsson 2008-09-15 14:25:14 +00:00
parent c4cd8e1086
commit 3338b6eb0c
3 changed files with 11 additions and 0 deletions

2
NEWS
View File

@ -1,5 +1,7 @@
Version 1.8 (unreleased)
* Add new parameter 'url' to specify the server template URL.
Version 1.7 (released 2008-09-01)
* Support two-factor mode to provide a password.

3
README
View File

@ -95,6 +95,9 @@ Supported PAM module parameters are:
"debug": to enable debug output to stdout,
"alwaysok": to enable that all authentication attempts should succeed
(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

View File

@ -188,6 +188,7 @@ pam_sm_authenticate (pam_handle_t * pamh,
const char *token_id[TOKEN_ID_LEN + 1] = { 0 };
char *token_otp_with_password = NULL;
char *token_password = NULL;
char *url_template = NULL;
int password_len = 0;
int valid_token = 0;
int i;
@ -210,6 +211,8 @@ pam_sm_authenticate (pam_handle_t * pamh,
alwaysok = 1;
if (strncmp (argv[i], "authfile=", 9) == 0)
auth_file = (char *) argv[i] + 9;
if (strncmp (argv[i], "url=", 4) == 0)
url_template = (char *) argv[i] + 4;
}
if (debug)
@ -296,6 +299,9 @@ pam_sm_authenticate (pam_handle_t * pamh,
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 */
token_otp_with_password = (char *) password;
password_len = strlen (token_otp_with_password);