aboutsummaryrefslogtreecommitdiff
path: root/src/Authorisation.c
diff options
context:
space:
mode:
authorgoodale <goodale@1faa4e14-9dd3-4be0-9f0e-ffe519881164>2000-09-18 21:42:37 +0000
committergoodale <goodale@1faa4e14-9dd3-4be0-9f0e-ffe519881164>2000-09-18 21:42:37 +0000
commit3969eb0efd59f2942493ed273e82ba63bfe5cc3a (patch)
treedb3192dee6697d99bd931ca445cb510a72076e3f /src/Authorisation.c
parent3ed49f02b7b2b3452d1fa8563781682235e89985 (diff)
Added an extra two arguments to the authentication so it returns
the username of the person who authenticated (optionally). Tom git-svn-id: http://svn.cactuscode.org/arrangements/CactusConnect/HTTPD/trunk@45 1faa4e14-9dd3-4be0-9f0e-ffe519881164
Diffstat (limited to 'src/Authorisation.c')
-rw-r--r--src/Authorisation.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Authorisation.c b/src/Authorisation.c
index 883dff8..92a6a27 100644
--- a/src/Authorisation.c
+++ b/src/Authorisation.c
@@ -156,7 +156,9 @@ int HTTP_AuthAddUser(const char *database,
@@*/
int HTTP_AuthenticateBasic(httpRequest *request,
- const char *database)
+ const char *database,
+ char *user,
+ int length)
{
int retval;
char message[1024];
@@ -203,6 +205,10 @@ int HTTP_AuthenticateBasic(httpRequest *request,
password++;
authorised = VerifyPassword(database, decoded, password);
+ if(user && strlen(user) < decoded_size)
+ {
+ sprintf(user,"%s", decoded);
+ }
}
}
}