| | | 1 | | // Licensed to the .NET Foundation under one or more agreements. |
| | | 2 | | // The .NET Foundation licenses this file to you under the MIT license. |
| | | 3 | | |
| | | 4 | | using System.ComponentModel; |
| | | 5 | | using System.Runtime.Serialization; |
| | | 6 | | |
| | | 7 | | namespace System.Security.Authentication |
| | | 8 | | { |
| | | 9 | | /// <summary> |
| | | 10 | | /// This exception can be thrown from Authenticate() method of Ssl and Negotiate classes. |
| | | 11 | | /// The authentication process can be retried with different parameters subject to |
| | | 12 | | /// remote party willingness of accepting that. |
| | | 13 | | /// </summary> |
| | | 14 | | [Serializable] |
| | | 15 | | [System.Runtime.CompilerServices.TypeForwardedFrom("System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c5 |
| | | 16 | | public class AuthenticationException : SystemException |
| | | 17 | | { |
| | | 18 | | public AuthenticationException() { } |
| | | 19 | | |
| | | 20 | | public AuthenticationException(string? message) : base(message) { } |
| | | 21 | | |
| | | 22 | | public AuthenticationException(string? message, Exception? innerException) : base(message, innerException) { } |
| | | 23 | | |
| | | 24 | | [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlForma |
| | | 25 | | [EditorBrowsable(EditorBrowsableState.Never)] |
| | | 26 | | protected AuthenticationException(SerializationInfo serializationInfo, StreamingContext streamingContext) : base |
| | | 27 | | { |
| | | 28 | | } |
| | | 29 | | } |
| | | 30 | | |
| | | 31 | | /// <summary> |
| | | 32 | | /// <para> |
| | | 33 | | /// This exception can be thrown from Authenticate() method of Ssl and Negotiate classes. |
| | | 34 | | /// The authentication is expected to fail prematurely if called using the same |
| | | 35 | | /// underlined stream. |
| | | 36 | | /// </para> |
| | | 37 | | /// </summary> |
| | | 38 | | [Serializable] |
| | | 39 | | [System.Runtime.CompilerServices.TypeForwardedFrom("System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c5 |
| | | 40 | | public class InvalidCredentialException : AuthenticationException |
| | | 41 | | { |
| | 0 | 42 | | public InvalidCredentialException() { } |
| | | 43 | | |
| | 0 | 44 | | public InvalidCredentialException(string? message) : base(message) { } |
| | | 45 | | |
| | 0 | 46 | | public InvalidCredentialException(string? message, Exception? innerException) : base(message, innerException) { |
| | | 47 | | |
| | | 48 | | [Obsolete(Obsoletions.LegacyFormatterImplMessage, DiagnosticId = Obsoletions.LegacyFormatterImplDiagId, UrlForma |
| | | 49 | | [EditorBrowsable(EditorBrowsableState.Never)] |
| | 0 | 50 | | protected InvalidCredentialException(SerializationInfo serializationInfo, StreamingContext streamingContext) : b |
| | 0 | 51 | | { |
| | 0 | 52 | | } |
| | | 53 | | } |
| | | 54 | | } |
| | | 55 | | |