Changeset 751fac6b567d675afee10e627efb5cf786ce5c83 for http/authn.cc
- Timestamp:
- 08/24/10 21:31:46 (21 months ago)
- Children:
- 7eb42bed950e3f81ef9f0d39432e07c55f12cc22
- Parents:
- ec0da3f87768820f9ca9e8065c7998e9d825bd4c
- git-committer:
- Antti-Juhani Kaijanaho <antti-juhani@…> (08/24/10 21:31:46)
- Files:
-
- 1 modified
-
http/authn.cc (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
http/authn.cc
rcc0a570 r751fac6 1 1 /* This file is part of Alue, the multiprotocol Internet discussion daemon 2 2 3 Copyright © 2009 Antti-Juhani Kaijanaho3 Copyright © 2009, 2010 Antti-Juhani Kaijanaho 4 4 5 5 Alue is free software: you can redistribute it and/or modify it … … 93 93 authn::tlate_value(boost::shared_ptr<request> req) 94 94 { 95 std::multimap<std::string,std::string> fb =96 req->get_form_data();97 95 std::string ruri = req->get_path(); 98 std::string query = req->get_ query_or_body();96 std::string query = req->get_form_as_query(); 99 97 if (!query.empty()) ruri += "?" + query; 100 98 tlate::value::ptr rv(new authn_value(req->get_user(), 101 lookup102 ( fb,"user.authn.message"),99 req->get_form_field 100 ("user.authn.message"), 103 101 ruri)); 104 102 return rv; … … 108 106 (boost::shared_ptr<request> req, response::factory rf) 109 107 { 110 std::multimap<std::string,std::string> fb = 111 req->get_form_data(); 112 ::uri redir = lookup(fb, "redirect"); 108 ::uri redir = req->get_form_field("redirect"); 113 109 114 110 std::string msg_name = "user.authn.message"; 115 111 116 if (req->get_path() == "/login" && fb.find("login") != fb.end())112 if (req->get_path() == "/login" && req->has_form_field("login")) 117 113 { 118 std::string user = lookup(fb,"userid");119 std::string pass = lookup(fb,"passwd");114 std::string user = req->get_form_field("userid"); 115 std::string pass = req->get_form_field("passwd"); 120 116 boost::shared_ptr<session> sess(new session()); 121 117 sess->authenticate(cb.dbase().lookup_user(user), pass);
