aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server/Handlers/Authentication/AuthenticationServerPostHandler.cs
diff options
context:
space:
mode:
authorMelanie2010-01-09 12:02:48 +0000
committerMelanie2010-01-09 12:02:48 +0000
commitd22bdb5095a6f08271014a52f91aadaff5ae9083 (patch)
tree76a09afdbae760025e0fc2d9306823d343ead349 /OpenSim/Server/Handlers/Authentication/AuthenticationServerPostHandler.cs
parentMaintain control() event stream (diff)
parentMerge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff)
downloadopensim-SC_OLD-d22bdb5095a6f08271014a52f91aadaff5ae9083.zip
opensim-SC_OLD-d22bdb5095a6f08271014a52f91aadaff5ae9083.tar.gz
opensim-SC_OLD-d22bdb5095a6f08271014a52f91aadaff5ae9083.tar.bz2
opensim-SC_OLD-d22bdb5095a6f08271014a52f91aadaff5ae9083.tar.xz
Merge branch 'master' into careminster
Diffstat (limited to 'OpenSim/Server/Handlers/Authentication/AuthenticationServerPostHandler.cs')
-rw-r--r--OpenSim/Server/Handlers/Authentication/AuthenticationServerPostHandler.cs14
1 files changed, 7 insertions, 7 deletions
diff --git a/OpenSim/Server/Handlers/Authentication/AuthenticationServerPostHandler.cs b/OpenSim/Server/Handlers/Authentication/AuthenticationServerPostHandler.cs
index 490a13a..47bc860 100644
--- a/OpenSim/Server/Handlers/Authentication/AuthenticationServerPostHandler.cs
+++ b/OpenSim/Server/Handlers/Authentication/AuthenticationServerPostHandler.cs
@@ -86,14 +86,14 @@ namespace OpenSim.Server.Handlers.Authentication
86 86
87 private byte[] DoPlainMethods(string body) 87 private byte[] DoPlainMethods(string body)
88 { 88 {
89 Dictionary<string, string> request = 89 Dictionary<string, object> request =
90 ServerUtils.ParseQueryString(body); 90 ServerUtils.ParseQueryString(body);
91 91
92 int lifetime = 30; 92 int lifetime = 30;
93 93
94 if (request.ContainsKey("LIFETIME")) 94 if (request.ContainsKey("LIFETIME"))
95 { 95 {
96 lifetime = Convert.ToInt32(request["LIFETIME"]); 96 lifetime = Convert.ToInt32(request["LIFETIME"].ToString());
97 if (lifetime > 30) 97 if (lifetime > 30)
98 lifetime = 30; 98 lifetime = 30;
99 } 99 }
@@ -103,12 +103,12 @@ namespace OpenSim.Server.Handlers.Authentication
103 if (!request.ContainsKey("PRINCIPAL")) 103 if (!request.ContainsKey("PRINCIPAL"))
104 return FailureResult(); 104 return FailureResult();
105 105
106 string method = request["METHOD"]; 106 string method = request["METHOD"].ToString();
107 107
108 UUID principalID; 108 UUID principalID;
109 string token; 109 string token;
110 110
111 if (!UUID.TryParse(request["PRINCIPAL"], out principalID)) 111 if (!UUID.TryParse(request["PRINCIPAL"].ToString(), out principalID))
112 return FailureResult(); 112 return FailureResult();
113 113
114 switch (method) 114 switch (method)
@@ -117,7 +117,7 @@ namespace OpenSim.Server.Handlers.Authentication
117 if (!request.ContainsKey("PASSWORD")) 117 if (!request.ContainsKey("PASSWORD"))
118 return FailureResult(); 118 return FailureResult();
119 119
120 token = m_AuthenticationService.Authenticate(principalID, request["PASSWORD"], lifetime); 120 token = m_AuthenticationService.Authenticate(principalID, request["PASSWORD"].ToString(), lifetime);
121 121
122 if (token != String.Empty) 122 if (token != String.Empty)
123 return SuccessResult(token); 123 return SuccessResult(token);
@@ -126,7 +126,7 @@ namespace OpenSim.Server.Handlers.Authentication
126 if (!request.ContainsKey("TOKEN")) 126 if (!request.ContainsKey("TOKEN"))
127 return FailureResult(); 127 return FailureResult();
128 128
129 if (m_AuthenticationService.Verify(principalID, request["TOKEN"], lifetime)) 129 if (m_AuthenticationService.Verify(principalID, request["TOKEN"].ToString(), lifetime))
130 return SuccessResult(); 130 return SuccessResult();
131 131
132 return FailureResult(); 132 return FailureResult();
@@ -134,7 +134,7 @@ namespace OpenSim.Server.Handlers.Authentication
134 if (!request.ContainsKey("TOKEN")) 134 if (!request.ContainsKey("TOKEN"))
135 return FailureResult(); 135 return FailureResult();
136 136
137 if (m_AuthenticationService.Release(principalID, request["TOKEN"])) 137 if (m_AuthenticationService.Release(principalID, request["TOKEN"].ToString()))
138 return SuccessResult(); 138 return SuccessResult();
139 139
140 return FailureResult(); 140 return FailureResult();