-
Notifications
You must be signed in to change notification settings - Fork 4.5k
/
AuthenticationManager.cs
51 lines (41 loc) · 1.96 KB
/
AuthenticationManager.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.Collections;
using System.Collections.Specialized;
namespace System.Net
{
public class AuthenticationManager
{
private AuthenticationManager() { }
public static ICredentialPolicy? CredentialPolicy { get; set; }
public static StringDictionary CustomTargetNameDictionary { get; } = new StringDictionary();
[Obsolete(Obsoletions.AuthenticationManagerMessage, DiagnosticId = Obsoletions.AuthenticationManagerDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public static Authorization? Authenticate(string challenge, WebRequest request, ICredentials credentials) =>
throw new PlatformNotSupportedException();
[Obsolete(Obsoletions.AuthenticationManagerMessage, DiagnosticId = Obsoletions.AuthenticationManagerDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public static Authorization? PreAuthenticate(WebRequest request, ICredentials credentials) =>
throw new PlatformNotSupportedException();
public static void Register(IAuthenticationModule authenticationModule)
{
if (authenticationModule is null)
{
throw new ArgumentNullException(nameof(authenticationModule));
}
}
public static void Unregister(IAuthenticationModule authenticationModule)
{
if (authenticationModule is null)
{
throw new ArgumentNullException(nameof(authenticationModule));
}
}
public static void Unregister(string authenticationScheme)
{
if (authenticationScheme is null)
{
throw new ArgumentNullException(nameof(authenticationScheme));
}
}
public static IEnumerator RegisteredModules => Array.Empty<IAuthenticationModule>().GetEnumerator();
}
}