[System] Authorization from referencesource
authorMarek Safar <marek.safar@gmail.com>
Mon, 16 May 2016 10:13:52 +0000 (12:13 +0200)
committerMarek Safar <marek.safar@gmail.com>
Mon, 16 May 2016 10:13:52 +0000 (12:13 +0200)
mcs/class/System/System.Net/AuthenticationManager.cs
mcs/class/System/System.Net/Authorization.cs [deleted file]
mcs/class/System/System.Net/HttpWebRequest.cs
mcs/class/System/System.Net/WebConnection.cs
mcs/class/System/System.dll.sources
mcs/class/System/mobile_System.dll.sources

index 679bd5ae1ea518800b299f70dfb567da7ff6a391..e987c5bd55f0c67461c3e0c6570d0b21efff6599 100644 (file)
@@ -136,7 +136,7 @@ namespace System.Net
                                        if (auth == null)
                                                continue;
 
-                                       auth.Module = mod;
+                                       auth.ModuleAuthenticationType = mod.AuthenticationType;
                                        return auth;
                                }
                        }
@@ -159,7 +159,7 @@ namespace System.Net
                                        if (auth == null)
                                                continue;
 
-                                       auth.Module = mod;
+                                       auth.ModuleAuthenticationType = mod.AuthenticationType;
                                        return auth;
                                }
                        }
diff --git a/mcs/class/System/System.Net/Authorization.cs b/mcs/class/System/System.Net/Authorization.cs
deleted file mode 100644 (file)
index a808454..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-//
-// System.Net.Authorization.cs
-//
-// Author:
-//   Miguel de Icaza (miguel@ximian.com)
-//   Lawrence Pit (loz@cable.a2000.nl)
-//
-// (C) Ximian, Inc.  http://www.ximian.com
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-namespace System.Net {
-
-       public class Authorization {
-               string token;
-               bool complete;
-               string connectionGroupId;
-               string [] protectionRealm;
-               IAuthenticationModule module;
-               
-               public Authorization (string token) : this (token, true)
-               {
-               }
-
-               public Authorization (string token, bool finished) 
-                       : this (token, finished, null)
-               {
-               }
-               
-               public Authorization (string token, bool finished, string connectionGroupId)
-               {
-                       this.token = token;
-                       this.complete = finished;
-                       this.connectionGroupId = connectionGroupId;
-               }
-
-               public string Message {
-                       get { return token; }
-               }
-
-               public bool Complete {
-                       get { return complete; }
-               }
-
-               public string ConnectionGroupId {
-                       get { return connectionGroupId; }
-               }       
-               
-               public string[] ProtectionRealm {
-                       get { return protectionRealm; }
-                       set { protectionRealm = value; }
-               }
-
-               internal IAuthenticationModule Module {
-                       get { return module; }
-                       set { module = value; }
-               }
-
-               static Exception GetMustImplement ()
-               {
-                       return new NotImplementedException ();
-               }
-               
-               [MonoTODO]
-               public bool MutuallyAuthenticated
-               {
-                       get {
-                               throw GetMustImplement ();
-                       }
-                       set {
-                               throw GetMustImplement ();
-                       }
-               }
-       }
-}
index 963d5849eed96bc009f1d54823113435d4e1970a..6ca3e0710a217a5929b244963c8c41153d5b475d 100644 (file)
@@ -1631,7 +1631,7 @@ namespace System.Net
                                        return false;
                                request.webHeaders [isProxy ? "Proxy-Authorization" : "Authorization"] = auth.Message;
                                isCompleted = auth.Complete;
-                               bool is_ntlm = (auth.Module.AuthenticationType == "NTLM");
+                               bool is_ntlm = (auth.ModuleAuthenticationType == "NTLM");
                                if (is_ntlm)
                                        ntlm_auth_state = (NtlmAuthState)((int) ntlm_auth_state + 1);
                                return true;
index f4f61725fb440e500fa5b40060cf7a489f6ec3d6..38ecf8efa340daaa4b6c94cc421ab72ac3e1840f 100644 (file)
@@ -261,7 +261,7 @@ namespace System.Net
                                        var auth = AuthenticationManager.Authenticate (challenge [i], connect_request, creds);
                                        if (auth == null)
                                                continue;
-                                       ntlm = (auth.Module.AuthenticationType == "NTLM");
+                                       ntlm = (auth.ModuleAuthenticationType == "NTLM");
                                        sb.Append ("\r\nProxy-Authorization: ");
                                        sb.Append (auth.Message);
                                        break;
index 084cfd57e3319b7de130d3f176f7318c58d708d8..48bbc5c80cb3555bb6a21ca06179e8d968a04900 100644 (file)
@@ -209,7 +209,6 @@ System.Media/SystemSound.cs
 System.Media/SystemSounds.cs
 System.Media/Win32SoundPlayer.cs
 System.Net/AuthenticationManager.cs
-System.Net/Authorization.cs
 System.Net/BasicClient.cs
 System.Net/BindIPEndPoint.cs
 System.Net/ChunkedInputStream.cs
@@ -1004,6 +1003,7 @@ ReferenceSources/_SslStream.cs
 ../referencesource/System/net/System/Net/_ScatterGatherBuffers.cs
 ../referencesource/System/net/System/Net/AuthenticationScheme.cs
 ../referencesource/System/net/System/Net/AuthenticationSchemeSelector.cs
+../referencesource/System/net/System/Net/Authorization.cs
 ../referencesource/System/net/System/Net/cookie.cs
 ../referencesource/System/net/System/Net/cookiecollection.cs
 ../referencesource/System/net/System/Net/cookiecontainer.cs
index 780fb02b75d56f15311ae29edc5b6200f9f47c07..510c164483230db77713431a3c7898d22ac5a34e 100644 (file)
@@ -164,7 +164,6 @@ System.Net.Sockets/TcpListener.cs
 System.Net.Sockets/UdpClient.cs
 ../referencesource/System/net/System/Net/Sockets/UdpReceiveResult.cs
 System.Net/AuthenticationManager.cs
-System.Net/Authorization.cs
 System.Net/BasicClient.cs
 System.Net/BindIPEndPoint.cs
 System.Net/ChunkStream.cs
@@ -716,6 +715,7 @@ ReferenceSources/Win32Exception.cs
 ../referencesource/System/net/System/Net/_ScatterGatherBuffers.cs
 ../referencesource/System/net/System/Net/AuthenticationScheme.cs
 ../referencesource/System/net/System/Net/AuthenticationSchemeSelector.cs
+../referencesource/System/net/System/Net/Authorization.cs
 ../referencesource/System/net/System/Net/cookie.cs
 ../referencesource/System/net/System/Net/cookiecollection.cs
 ../referencesource/System/net/System/Net/cookiecontainer.cs