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)
183
NegotiateAuthenticationStatusCode
statusCode;
187
if (statusCode >
NegotiateAuthenticationStatusCode
.ContinueNeeded || challengeResponse == null)
210
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)
241
return new UnsupportedNegotiateAuthenticationPal(clientOptions,
NegotiateAuthenticationStatusCode
.UnknownCredentials);
264
public override unsafe byte[]? GetOutgoingBlob(ReadOnlySpan<byte> incomingBlob, out
NegotiateAuthenticationStatusCode
statusCode)
283
statusCode =
NegotiateAuthenticationStatusCode
.ContinueNeeded;
563
private unsafe byte[]? ProcessChallenge(ReadOnlySpan<byte> blob, out
NegotiateAuthenticationStatusCode
statusCode)
573
statusCode =
NegotiateAuthenticationStatusCode
.InvalidToken;
586
statusCode =
NegotiateAuthenticationStatusCode
.InvalidToken;
593
statusCode =
NegotiateAuthenticationStatusCode
.QopNotSupported;
605
statusCode =
NegotiateAuthenticationStatusCode
.InvalidToken;
699
statusCode =
NegotiateAuthenticationStatusCode
.Completed;
762
public override
NegotiateAuthenticationStatusCode
Wrap(ReadOnlySpan<byte> input, IBufferWriter<byte> outputWriter, bool _/*requestEncryption*/, out bool isEncrypted)
777
return
NegotiateAuthenticationStatusCode
.Completed;
780
public override
NegotiateAuthenticationStatusCode
Unwrap(ReadOnlySpan<byte> input, IBufferWriter<byte> outputWriter, out bool wasEncrypted)
791
return
NegotiateAuthenticationStatusCode
.InvalidToken;
799
return
NegotiateAuthenticationStatusCode
.MessageAltered;
804
return
NegotiateAuthenticationStatusCode
.Completed;
807
public override
NegotiateAuthenticationStatusCode
UnwrapInPlace(Span<byte> input, out int unwrappedOffset, out int unwrappedLength, out bool wasEncrypted)
820
return
NegotiateAuthenticationStatusCode
.InvalidToken;
827
return
NegotiateAuthenticationStatusCode
.MessageAltered;
830
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)
53
NegotiateAuthenticationStatusCode
statusCode = UnixNegotiateAuthenticationPal.GetErrorCode(gex);
54
if (statusCode <=
NegotiateAuthenticationStatusCode
.GenericFailure)
56
statusCode =
NegotiateAuthenticationStatusCode
.Unsupported;
76
NegotiateAuthenticationStatusCode
statusCode = UnixNegotiateAuthenticationPal.GetErrorCode(gex);
77
if (statusCode <=
NegotiateAuthenticationStatusCode
.GenericFailure)
79
statusCode =
NegotiateAuthenticationStatusCode
.Unsupported;
267
public override byte[]? GetOutgoingBlob(ReadOnlySpan<byte> incomingBlob, out
NegotiateAuthenticationStatusCode
statusCode)
303
if (statusCode >=
NegotiateAuthenticationStatusCode
.GenericFailure)
317
if (statusCode ==
NegotiateAuthenticationStatusCode
.Completed)
332
public override
NegotiateAuthenticationStatusCode
Wrap(ReadOnlySpan<byte> input, IBufferWriter<byte> outputWriter, bool requestEncryption, out bool isEncrypted)
350
return
NegotiateAuthenticationStatusCode
.GenericFailure;
355
return
NegotiateAuthenticationStatusCode
.Completed;
363
public override
NegotiateAuthenticationStatusCode
Unwrap(ReadOnlySpan<byte> input, IBufferWriter<byte> outputWriter, out bool wasEncrypted)
376
Interop.NetSecurityNative.Status.GSS_S_BAD_SIG =>
NegotiateAuthenticationStatusCode
.MessageAltered,
377
_ =>
NegotiateAuthenticationStatusCode
.InvalidToken
383
return
NegotiateAuthenticationStatusCode
.Completed;
391
public override unsafe
NegotiateAuthenticationStatusCode
UnwrapInPlace(Span<byte> input, out int unwrappedOffset, out int unwrappedLength, out bool wasEncrypted)
406
Interop.NetSecurityNative.Status.GSS_S_BAD_SIG =>
NegotiateAuthenticationStatusCode
.MessageAltered,
407
_ =>
NegotiateAuthenticationStatusCode
.InvalidToken
414
return
NegotiateAuthenticationStatusCode
.Completed;
548
private unsafe
NegotiateAuthenticationStatusCode
InitializeSecurityContext(
661
NegotiateAuthenticationStatusCode
.Completed :
662
NegotiateAuthenticationStatusCode
.ContinueNeeded;
667
return
NegotiateAuthenticationStatusCode
.GenericFailure;
675
private
NegotiateAuthenticationStatusCode
AcceptSecurityContext(
716
NegotiateAuthenticationStatusCode
errorCode;
727
errorCode =
NegotiateAuthenticationStatusCode
.Completed;
731
errorCode =
NegotiateAuthenticationStatusCode
.ContinueNeeded;
740
return
NegotiateAuthenticationStatusCode
.GenericFailure;
749
internal static
NegotiateAuthenticationStatusCode
GetErrorCode(Interop.NetSecurityNative.GssApiException exception)
754
return
NegotiateAuthenticationStatusCode
.UnknownCredentials;
756
return
NegotiateAuthenticationStatusCode
.BadBinding;
758
return
NegotiateAuthenticationStatusCode
.CredentialsExpired;
760
return
NegotiateAuthenticationStatusCode
.InvalidToken;
762
return
NegotiateAuthenticationStatusCode
.InvalidCredentials;
764
return
NegotiateAuthenticationStatusCode
.MessageAltered;
767
return
NegotiateAuthenticationStatusCode
.Unsupported;
770
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;