search for: htpasswd_auth

Displaying 2 results from an estimated 2 matches for "htpasswd_auth".

2006 Mar 24
2
Basic Auth in WEBrick
...WEBrick such as: realm = "Gnome realm" start_webrick {|server| htpasswd = HTTPAuth::Htpasswd.new(/tmp/gnome.htpasswd) authenticator = HTTPAuth::BasicAuth.new( :UserDb => htpasswd :Realm => realm ) server.mount_proc(/htpasswd_auth) {|req resp| authenticator.authenticate(req resp) resp.body = "You are authenticated to see the super secret datan" } } Do I replace the script/server file with something like this? If there an actual example of working with rails, not just WEBrick as...
2004 Aug 06
4
No Duplicate Users - Patch
...tor, username, password); + authenticator, source, username, password); if(result == AUTH_OK) client->username = strdup(username); @@ -106,6 +130,7 @@ typedef struct { char *filename; + int allow_duplicate_users; rwlock_t file_rwlock; } htpasswd_auth_state; @@ -150,14 +175,20 @@ #define MAX_LINE_LEN 512 /* Not efficient; opens and scans the entire file for every request */ -static auth_result htpasswd_auth(auth_t *auth, char *username, char *password) +static auth_result htpasswd_auth(auth_t *auth, source_t *source, char *username, char...