/
AuthenticationException.cs
54 lines (45 loc) · 2.46 KB
/
AuthenticationException.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
52
53
54
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.ComponentModel;
using System.Runtime.Serialization;
namespace System.Security.Authentication
{
/// <summary>
/// This exception can be thrown from Authenticate() method of Ssl and Negotiate classes.
/// The authentication process can be retried with different parameters subject to
/// remote party willingness of accepting that.
/// </summary>
[Serializable]
[System.Runtime.CompilerServices.TypeForwardedFrom("System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public class AuthenticationException : SystemException
{
public AuthenticationException() { }
public AuthenticationException(string? message) : base(message) { }
public AuthenticationException(string? message, Exception? innerException) : base(message, innerException) { }
[Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
[EditorBrowsable(EditorBrowsableState.Never)]
protected AuthenticationException(SerializationInfo serializationInfo, StreamingContext streamingContext) : base(serializationInfo, streamingContext)
{
}
}
/// <summary>
/// <para>
/// This exception can be thrown from Authenticate() method of Ssl and Negotiate classes.
/// The authentication is expected to fail prematurely if called using the same
/// underlined stream.
/// </para>
/// </summary>
[Serializable]
[System.Runtime.CompilerServices.TypeForwardedFrom("System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public class InvalidCredentialException : AuthenticationException
{
public InvalidCredentialException() { }
public InvalidCredentialException(string? message) : base(message) { }
public InvalidCredentialException(string? message, Exception? innerException) : base(message, innerException) { }
[Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
[EditorBrowsable(EditorBrowsableState.Never)]
protected InvalidCredentialException(SerializationInfo serializationInfo, StreamingContext streamingContext) : base(serializationInfo, streamingContext)
{
}
}
}