177 references to NegotiateAuthenticationStatusCode
Microsoft.AspNetCore.Authentication.Negotiate (14)
Internal\NegotiateState.cs (14)
22
var outgoingBlob = _instance.GetOutgoingBlob(incomingBlob, out
var
authStatus);
24
if (authStatus ==
NegotiateAuthenticationStatusCode
.Completed ||
25
authStatus ==
NegotiateAuthenticationStatusCode
.ContinueNeeded)
71
private static bool IsCredentialError(
NegotiateAuthenticationStatusCode
error)
73
return error ==
NegotiateAuthenticationStatusCode
.UnknownCredentials ||
74
error ==
NegotiateAuthenticationStatusCode
.CredentialsExpired ||
75
error ==
NegotiateAuthenticationStatusCode
.BadBinding;
78
private static bool IsClientError(
NegotiateAuthenticationStatusCode
error)
80
return error ==
NegotiateAuthenticationStatusCode
.InvalidToken ||
81
error ==
NegotiateAuthenticationStatusCode
.QopNotSupported ||
82
error ==
NegotiateAuthenticationStatusCode
.UnknownCredentials ||
83
error ==
NegotiateAuthenticationStatusCode
.MessageAltered ||
84
error ==
NegotiateAuthenticationStatusCode
.OutOfSequence ||
85
error ==
NegotiateAuthenticationStatusCode
.InvalidCredentials;
System.Net.Http (3)
System\Net\Http\SocketsHttpHandler\AuthenticationHelper.NtAuth.cs (3)
153
NegotiateAuthenticationStatusCode
statusCode;
157
if (statusCode >
NegotiateAuthenticationStatusCode
.ContinueNeeded || challengeResponse == null)
180
if (statusCode >
NegotiateAuthenticationStatusCode
.ContinueNeeded)
System.Net.Mail (9)
System\Net\Mail\SmtpNegotiateAuthenticationModule.cs (6)
54
NegotiateAuthenticationStatusCode
statusCode;
61
if (statusCode !=
NegotiateAuthenticationStatusCode
.Completed &&
62
statusCode !=
NegotiateAuthenticationStatusCode
.ContinueNeeded)
119
NegotiateAuthenticationStatusCode
statusCode;
122
if (statusCode !=
NegotiateAuthenticationStatusCode
.Completed)
168
if (statusCode !=
NegotiateAuthenticationStatusCode
.Completed)
System\Net\Mail\SmtpNtlmAuthenticationModule.cs (3)
40
NegotiateAuthenticationStatusCode
statusCode;
43
if (statusCode !=
NegotiateAuthenticationStatusCode
.Completed &&
44
statusCode !=
NegotiateAuthenticationStatusCode
.ContinueNeeded)
System.Net.Security (151)
System\Net\NegotiateAuthenticationPal.cs (4)
22
public abstract byte[]? GetOutgoingBlob(ReadOnlySpan<byte> incomingBlob, out
NegotiateAuthenticationStatusCode
statusCode);
23
public abstract
NegotiateAuthenticationStatusCode
Wrap(ReadOnlySpan<byte> input, IBufferWriter<byte> outputWriter, bool requestEncryption, out bool isEncrypted);
24
public abstract
NegotiateAuthenticationStatusCode
Unwrap(ReadOnlySpan<byte> input, IBufferWriter<byte> outputWriter, out bool wasEncrypted);
25
public abstract
NegotiateAuthenticationStatusCode
UnwrapInPlace(Span<byte> input, out int unwrappedOffset, out int unwrappedLength, out bool wasEncrypted);
System\Net\NegotiateAuthenticationPal.ManagedNtlm.cs (19)
308
return new UnsupportedNegotiateAuthenticationPal(clientOptions,
NegotiateAuthenticationStatusCode
.UnknownCredentials);
331
public override unsafe byte[]? GetOutgoingBlob(ReadOnlySpan<byte> incomingBlob, out
NegotiateAuthenticationStatusCode
statusCode)
350
statusCode =
NegotiateAuthenticationStatusCode
.ContinueNeeded;
617
private unsafe byte[]? ProcessChallenge(ReadOnlySpan<byte> blob, out
NegotiateAuthenticationStatusCode
statusCode)
627
statusCode =
NegotiateAuthenticationStatusCode
.InvalidToken;
640
statusCode =
NegotiateAuthenticationStatusCode
.InvalidToken;
647
statusCode =
NegotiateAuthenticationStatusCode
.QopNotSupported;
659
statusCode =
NegotiateAuthenticationStatusCode
.InvalidToken;
753
statusCode =
NegotiateAuthenticationStatusCode
.Completed;
816
public override
NegotiateAuthenticationStatusCode
Wrap(ReadOnlySpan<byte> input, IBufferWriter<byte> outputWriter, bool _/*requestEncryption*/, out bool isEncrypted)
831
return
NegotiateAuthenticationStatusCode
.Completed;
834
public override
NegotiateAuthenticationStatusCode
Unwrap(ReadOnlySpan<byte> input, IBufferWriter<byte> outputWriter, out bool wasEncrypted)
845
return
NegotiateAuthenticationStatusCode
.InvalidToken;
853
return
NegotiateAuthenticationStatusCode
.MessageAltered;
858
return
NegotiateAuthenticationStatusCode
.Completed;
861
public override
NegotiateAuthenticationStatusCode
UnwrapInPlace(Span<byte> input, out int unwrappedOffset, out int unwrappedLength, out bool wasEncrypted)
874
return
NegotiateAuthenticationStatusCode
.InvalidToken;
881
return
NegotiateAuthenticationStatusCode
.MessageAltered;
884
return
NegotiateAuthenticationStatusCode
.Completed;
System\Net\NegotiateAuthenticationPal.ManagedSpnego.cs (25)
97
public override unsafe byte[]? GetOutgoingBlob(ReadOnlySpan<byte> incomingBlob, out
NegotiateAuthenticationStatusCode
statusCode)
140
private byte[]? CreateSpNegoNegotiateMessage(ReadOnlySpan<byte> incomingBlob, out
NegotiateAuthenticationStatusCode
statusCode)
179
if (statusCode !=
NegotiateAuthenticationStatusCode
.ContinueNeeded &&
180
statusCode !=
NegotiateAuthenticationStatusCode
.Completed)
185
if (statusCode !=
NegotiateAuthenticationStatusCode
.Unsupported)
212
statusCode =
NegotiateAuthenticationStatusCode
.ContinueNeeded;
216
private byte[]? ProcessSpNegoChallenge(ReadOnlySpan<byte> challenge, out
NegotiateAuthenticationStatusCode
statusCode)
278
statusCode =
NegotiateAuthenticationStatusCode
.InvalidToken;
294
statusCode =
NegotiateAuthenticationStatusCode
.Unsupported;
316
statusCode =
NegotiateAuthenticationStatusCode
.InvalidToken;
326
if (statusCode !=
NegotiateAuthenticationStatusCode
.ContinueNeeded &&
327
statusCode !=
NegotiateAuthenticationStatusCode
.Completed)
345
if (statusCode ==
NegotiateAuthenticationStatusCode
.Completed)
357
statusCode = state == NegState.RequestMic ?
NegotiateAuthenticationStatusCode
.ContinueNeeded :
NegotiateAuthenticationStatusCode
.Completed;
358
_isAuthenticated = statusCode ==
NegotiateAuthenticationStatusCode
.Completed;
380
statusCode =
NegotiateAuthenticationStatusCode
.GenericFailure;
386
statusCode =
NegotiateAuthenticationStatusCode
.MessageAltered;
395
NegState.AcceptCompleted =>
NegotiateAuthenticationStatusCode
.Completed,
396
NegState.AcceptIncomplete =>
NegotiateAuthenticationStatusCode
.ContinueNeeded,
397
NegState.Reject =>
NegotiateAuthenticationStatusCode
.UnknownCredentials,
398
_ =>
NegotiateAuthenticationStatusCode
.GenericFailure
404
public override
NegotiateAuthenticationStatusCode
Wrap(ReadOnlySpan<byte> input, IBufferWriter<byte> outputWriter, bool requestEncryption, out bool isEncrypted)
414
public override
NegotiateAuthenticationStatusCode
Unwrap(ReadOnlySpan<byte> input, IBufferWriter<byte> outputWriter, out bool wasEncrypted)
424
public override
NegotiateAuthenticationStatusCode
UnwrapInPlace(Span<byte> input, out int unwrappedOffset, out int unwrappedLength, out bool wasEncrypted)
System\Net\NegotiateAuthenticationPal.Unix.cs (38)
46
NegotiateAuthenticationStatusCode
statusCode = UnixNegotiateAuthenticationPal.GetErrorCode(gex);
47
if (statusCode <=
NegotiateAuthenticationStatusCode
.GenericFailure)
49
statusCode =
NegotiateAuthenticationStatusCode
.Unsupported;
69
NegotiateAuthenticationStatusCode
statusCode = UnixNegotiateAuthenticationPal.GetErrorCode(gex);
70
if (statusCode <=
NegotiateAuthenticationStatusCode
.GenericFailure)
72
statusCode =
NegotiateAuthenticationStatusCode
.Unsupported;
260
public override byte[]? GetOutgoingBlob(ReadOnlySpan<byte> incomingBlob, out
NegotiateAuthenticationStatusCode
statusCode)
296
if (statusCode >=
NegotiateAuthenticationStatusCode
.GenericFailure)
310
if (statusCode ==
NegotiateAuthenticationStatusCode
.Completed)
325
public override
NegotiateAuthenticationStatusCode
Wrap(ReadOnlySpan<byte> input, IBufferWriter<byte> outputWriter, bool requestEncryption, out bool isEncrypted)
343
return
NegotiateAuthenticationStatusCode
.GenericFailure;
348
return
NegotiateAuthenticationStatusCode
.Completed;
356
public override
NegotiateAuthenticationStatusCode
Unwrap(ReadOnlySpan<byte> input, IBufferWriter<byte> outputWriter, out bool wasEncrypted)
369
Interop.NetSecurityNative.Status.GSS_S_BAD_SIG =>
NegotiateAuthenticationStatusCode
.MessageAltered,
370
_ =>
NegotiateAuthenticationStatusCode
.InvalidToken
376
return
NegotiateAuthenticationStatusCode
.Completed;
384
public override unsafe
NegotiateAuthenticationStatusCode
UnwrapInPlace(Span<byte> input, out int unwrappedOffset, out int unwrappedLength, out bool wasEncrypted)
399
Interop.NetSecurityNative.Status.GSS_S_BAD_SIG =>
NegotiateAuthenticationStatusCode
.MessageAltered,
400
_ =>
NegotiateAuthenticationStatusCode
.InvalidToken
407
return
NegotiateAuthenticationStatusCode
.Completed;
541
private unsafe
NegotiateAuthenticationStatusCode
InitializeSecurityContext(
654
NegotiateAuthenticationStatusCode
.Completed :
655
NegotiateAuthenticationStatusCode
.ContinueNeeded;
660
return
NegotiateAuthenticationStatusCode
.GenericFailure;
668
private
NegotiateAuthenticationStatusCode
AcceptSecurityContext(
709
NegotiateAuthenticationStatusCode
errorCode;
720
errorCode =
NegotiateAuthenticationStatusCode
.Completed;
724
errorCode =
NegotiateAuthenticationStatusCode
.ContinueNeeded;
733
return
NegotiateAuthenticationStatusCode
.GenericFailure;
742
internal static
NegotiateAuthenticationStatusCode
GetErrorCode(Interop.NetSecurityNative.GssApiException exception)
747
return
NegotiateAuthenticationStatusCode
.UnknownCredentials;
749
return
NegotiateAuthenticationStatusCode
.BadBinding;
751
return
NegotiateAuthenticationStatusCode
.CredentialsExpired;
753
return
NegotiateAuthenticationStatusCode
.InvalidToken;
755
return
NegotiateAuthenticationStatusCode
.InvalidCredentials;
757
return
NegotiateAuthenticationStatusCode
.MessageAltered;
760
return
NegotiateAuthenticationStatusCode
.Unsupported;
763
return
NegotiateAuthenticationStatusCode
.GenericFailure;
System\Net\NegotiateAuthenticationPal.Unsupported.cs (9)
18
private
NegotiateAuthenticationStatusCode
_statusCode;
29
public UnsupportedNegotiateAuthenticationPal(NegotiateAuthenticationClientOptions clientOptions,
NegotiateAuthenticationStatusCode
statusCode =
NegotiateAuthenticationStatusCode
.Unsupported)
36
public UnsupportedNegotiateAuthenticationPal(NegotiateAuthenticationServerOptions serverOptions,
NegotiateAuthenticationStatusCode
statusCode =
NegotiateAuthenticationStatusCode
.Unsupported)
46
public override byte[]? GetOutgoingBlob(ReadOnlySpan<byte> incomingBlob, out
NegotiateAuthenticationStatusCode
statusCode)
52
public override
NegotiateAuthenticationStatusCode
Wrap(ReadOnlySpan<byte> input, IBufferWriter<byte> outputWriter, bool requestEncryption, out bool isEncrypted) => throw new InvalidOperationException();
53
public override
NegotiateAuthenticationStatusCode
Unwrap(ReadOnlySpan<byte> input, IBufferWriter<byte> outputWriter, out bool wasEncrypted) => throw new InvalidOperationException();
54
public override
NegotiateAuthenticationStatusCode
UnwrapInPlace(Span<byte> input, out int unwrappedOffset, out int unwrappedLength, out bool wasEncrypted) => throw new InvalidOperationException();
System\Net\Security\NegotiateAuthentication.cs (25)
201
/// Successful step of the authentication returns either <see cref="
NegotiateAuthenticationStatusCode
.Completed" />
202
/// or <see cref="
NegotiateAuthenticationStatusCode
.ContinueNeeded" /> status codes.
205
/// When <see cref="
NegotiateAuthenticationStatusCode
.ContinueNeeded" /> is returned the
208
public byte[]? GetOutgoingBlob(ReadOnlySpan<byte> incomingBlob, out
NegotiateAuthenticationStatusCode
statusCode)
218
if (statusCode ==
NegotiateAuthenticationStatusCode
.Completed)
222
statusCode =
NegotiateAuthenticationStatusCode
.TargetUnknown;
226
statusCode =
NegotiateAuthenticationStatusCode
.ImpersonationValidationFailed;
230
statusCode =
NegotiateAuthenticationStatusCode
.SecurityQosFailed;
247
/// Successful step of the authentication returns either <see cref="
NegotiateAuthenticationStatusCode
.Completed" />
248
/// or <see cref="
NegotiateAuthenticationStatusCode
.ContinueNeeded" /> status codes.
251
/// When <see cref="
NegotiateAuthenticationStatusCode
.ContinueNeeded" /> is returned the
254
public string? GetOutgoingBlob(string? incomingBlob, out
NegotiateAuthenticationStatusCode
statusCode)
280
/// <see cref="
NegotiateAuthenticationStatusCode
.Completed" /> on success, other
281
/// <see cref="
NegotiateAuthenticationStatusCode
" /> values on failure.
290
public
NegotiateAuthenticationStatusCode
Wrap(ReadOnlySpan<byte> input, IBufferWriter<byte> outputWriter, bool requestEncryption, out bool isEncrypted)
309
/// <see cref="
NegotiateAuthenticationStatusCode
.Completed" /> on success.
310
/// <see cref="
NegotiateAuthenticationStatusCode
.MessageAltered" /> if the message signature was
312
/// <see cref="
NegotiateAuthenticationStatusCode
.InvalidToken" /> if the wrapped message was
314
/// Other <see cref="
NegotiateAuthenticationStatusCode
" /> values on failure.
317
public
NegotiateAuthenticationStatusCode
Unwrap(ReadOnlySpan<byte> input, IBufferWriter<byte> outputWriter, out bool wasEncrypted)
337
/// <see cref="
NegotiateAuthenticationStatusCode
.Completed" /> on success.
338
/// <see cref="
NegotiateAuthenticationStatusCode
.MessageAltered" /> if the message signature was
340
/// <see cref="
NegotiateAuthenticationStatusCode
.InvalidToken" /> if the wrapped message was
342
/// Other <see cref="
NegotiateAuthenticationStatusCode
" /> values on failure.
345
public
NegotiateAuthenticationStatusCode
UnwrapInPlace(Span<byte> input, out int unwrappedOffset, out int unwrappedLength, out bool wasEncrypted)
System\Net\Security\NegotiateStream.cs (31)
394
NegotiateAuthenticationStatusCode
statusCode;
403
statusCode =
NegotiateAuthenticationStatusCode
.InvalidToken;
409
statusCode =
NegotiateAuthenticationStatusCode
.Completed;
417
if (statusCode !=
NegotiateAuthenticationStatusCode
.Completed)
523
NegotiateAuthenticationStatusCode
statusCode;
531
statusCode =
NegotiateAuthenticationStatusCode
.Completed;
538
if (statusCode !=
NegotiateAuthenticationStatusCode
.Completed)
755
NegotiateAuthenticationStatusCode
statusCode =
NegotiateAuthenticationStatusCode
.Completed;
761
if (statusCode is
NegotiateAuthenticationStatusCode
.BadBinding or
762
NegotiateAuthenticationStatusCode
.TargetUnknown or
763
NegotiateAuthenticationStatusCode
.ImpersonationValidationFailed or
764
NegotiateAuthenticationStatusCode
.SecurityQosFailed)
768
NegotiateAuthenticationStatusCode
.BadBinding =>
770
NegotiateAuthenticationStatusCode
.TargetUnknown =>
772
NegotiateAuthenticationStatusCode
.ImpersonationValidationFailed =>
784
else if (statusCode ==
NegotiateAuthenticationStatusCode
.Completed)
814
else if (statusCode !=
NegotiateAuthenticationStatusCode
.ContinueNeeded)
818
NegotiateAuthenticationStatusCode
.BadBinding => (int)Interop.SECURITY_STATUS.BadBinding,
819
NegotiateAuthenticationStatusCode
.Unsupported => (int)Interop.SECURITY_STATUS.Unsupported,
820
NegotiateAuthenticationStatusCode
.MessageAltered => (int)Interop.SECURITY_STATUS.MessageAltered,
821
NegotiateAuthenticationStatusCode
.ContextExpired => (int)Interop.SECURITY_STATUS.ContextExpired,
822
NegotiateAuthenticationStatusCode
.CredentialsExpired => (int)Interop.SECURITY_STATUS.CertExpired,
823
NegotiateAuthenticationStatusCode
.InvalidCredentials => (int)Interop.SECURITY_STATUS.LogonDenied,
824
NegotiateAuthenticationStatusCode
.InvalidToken => (int)Interop.SECURITY_STATUS.InvalidToken,
825
NegotiateAuthenticationStatusCode
.UnknownCredentials => (int)Interop.SECURITY_STATUS.UnknownCredentials,
826
NegotiateAuthenticationStatusCode
.QopNotSupported => (int)Interop.SECURITY_STATUS.QopNotSupported,
827
NegotiateAuthenticationStatusCode
.OutOfSequence => (int)Interop.SECURITY_STATUS.OutOfSequence,
833
NegotiateAuthenticationStatusCode
.InvalidCredentials =>
889
_context.GetOutgoingBlob(message, out
NegotiateAuthenticationStatusCode
statusCode);
890
_remoteOk = statusCode is
NegotiateAuthenticationStatusCode
.Completed;