@@ -491,19 +491,15 @@
}
void
-set_auth_token(struct user_pass *up, struct user_pass *tk, const char *token)
+set_auth_token(struct user_pass *tk, const char *token)
{
-
if (strlen(token))
{
strncpynt(tk->password, token, USER_PASS_LEN);
tk->token_defined = true;
/*
- * --auth-token has no username, so it needs the username
- * either already set or copied from up, or later set by
- * --auth-token-user
- * If already set, tk is fully defined.
+ * If username already set, tk is fully defined.
*/
if (strlen(tk->username))
{
@@ -152,26 +152,18 @@
return get_user_pass_cr(up, auth_file, prefix, flags, NULL);
}
-void fail_user_pass(const char *prefix,
- const unsigned int flags,
- const char *reason);
-
void purge_user_pass(struct user_pass *up, const bool force);
/**
- * Sets the auth-token to token. If a username is available from
- * either up or already present in tk that will be used as default
- * username for the token. The method will also purge up if
+ * Sets the auth-token to token. The method will also purge up if
* the auth-nocache option is active.
*
- * @param up (non Auth-token) Username/password
* @param tk auth-token userpass to set
* @param token token to use as password for the auth-token
*
* @note all parameters to this function must not be null.
*/
-void set_auth_token(struct user_pass *up, struct user_pass *tk,
- const char *token);
+void set_auth_token(struct user_pass *tk, const char *token);
/**
* Sets the auth-token username by base64 decoding the passed
@@ -340,7 +340,7 @@
void
ssl_set_auth_token(const char *token)
{
- set_auth_token(&auth_user_pass, &auth_token, token);
+ set_auth_token(&auth_token, token);
}
void