186 references to NegotiateAuthenticationStatusCode
Microsoft.AspNetCore.Authentication.Negotiate (14)
Internal\NegotiateState.cs (14)
38
var outgoingBlob = _instance.GetOutgoingBlob(incomingBlob, out
var
authStatus);
40
if (authStatus ==
NegotiateAuthenticationStatusCode
.Completed ||
41
authStatus ==
NegotiateAuthenticationStatusCode
.ContinueNeeded)
94
private static bool IsCredentialError(
NegotiateAuthenticationStatusCode
error)
96
return error ==
NegotiateAuthenticationStatusCode
.UnknownCredentials ||
97
error ==
NegotiateAuthenticationStatusCode
.CredentialsExpired ||
98
error ==
NegotiateAuthenticationStatusCode
.BadBinding;
101
private static bool IsClientError(
NegotiateAuthenticationStatusCode
error)
103
return error ==
NegotiateAuthenticationStatusCode
.InvalidToken ||
104
error ==
NegotiateAuthenticationStatusCode
.QopNotSupported ||
105
error ==
NegotiateAuthenticationStatusCode
.UnknownCredentials ||
106
error ==
NegotiateAuthenticationStatusCode
.MessageAltered ||
107
error ==
NegotiateAuthenticationStatusCode
.OutOfSequence ||
108
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 (160)
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 (21)
308
return new UnsupportedNegotiateAuthenticationPal(clientOptions,
NegotiateAuthenticationStatusCode
.UnknownCredentials);
331
public override unsafe byte[]? GetOutgoingBlob(ReadOnlySpan<byte> incomingBlob, out
NegotiateAuthenticationStatusCode
statusCode)
350
statusCode =
NegotiateAuthenticationStatusCode
.ContinueNeeded;
629
private unsafe byte[]? ProcessChallenge(ReadOnlySpan<byte> blob, out
NegotiateAuthenticationStatusCode
statusCode)
634
statusCode =
NegotiateAuthenticationStatusCode
.InvalidToken;
644
statusCode =
NegotiateAuthenticationStatusCode
.InvalidToken;
657
statusCode =
NegotiateAuthenticationStatusCode
.InvalidToken;
664
statusCode =
NegotiateAuthenticationStatusCode
.QopNotSupported;
672
statusCode =
NegotiateAuthenticationStatusCode
.InvalidToken;
681
statusCode =
NegotiateAuthenticationStatusCode
.InvalidToken;
775
statusCode =
NegotiateAuthenticationStatusCode
.Completed;
838
public override
NegotiateAuthenticationStatusCode
Wrap(ReadOnlySpan<byte> input, IBufferWriter<byte> outputWriter, bool _/*requestEncryption*/, out bool isEncrypted)
853
return
NegotiateAuthenticationStatusCode
.Completed;
856
public override
NegotiateAuthenticationStatusCode
Unwrap(ReadOnlySpan<byte> input, IBufferWriter<byte> outputWriter, out bool wasEncrypted)
867
return
NegotiateAuthenticationStatusCode
.InvalidToken;
875
return
NegotiateAuthenticationStatusCode
.MessageAltered;
880
return
NegotiateAuthenticationStatusCode
.Completed;
883
public override
NegotiateAuthenticationStatusCode
UnwrapInPlace(Span<byte> input, out int unwrappedOffset, out int unwrappedLength, out bool wasEncrypted)
896
return
NegotiateAuthenticationStatusCode
.InvalidToken;
903
return
NegotiateAuthenticationStatusCode
.MessageAltered;
906
return
NegotiateAuthenticationStatusCode
.Completed;
System\Net\NegotiateAuthenticationPal.ManagedSpnego.cs (26)
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)
195
statusCode ==
NegotiateAuthenticationStatusCode
.Unsupported ||
196
statusCode ==
NegotiateAuthenticationStatusCode
.UnknownCredentials;
224
statusCode =
NegotiateAuthenticationStatusCode
.ContinueNeeded;
228
private byte[]? ProcessSpNegoChallenge(ReadOnlySpan<byte> challenge, out
NegotiateAuthenticationStatusCode
statusCode)
290
statusCode =
NegotiateAuthenticationStatusCode
.InvalidToken;
306
statusCode =
NegotiateAuthenticationStatusCode
.Unsupported;
328
statusCode =
NegotiateAuthenticationStatusCode
.InvalidToken;
338
if (statusCode !=
NegotiateAuthenticationStatusCode
.ContinueNeeded &&
339
statusCode !=
NegotiateAuthenticationStatusCode
.Completed)
357
if (statusCode ==
NegotiateAuthenticationStatusCode
.Completed)
369
statusCode = state == NegState.RequestMic ?
NegotiateAuthenticationStatusCode
.ContinueNeeded :
NegotiateAuthenticationStatusCode
.Completed;
370
_isAuthenticated = statusCode ==
NegotiateAuthenticationStatusCode
.Completed;
392
statusCode =
NegotiateAuthenticationStatusCode
.GenericFailure;
398
statusCode =
NegotiateAuthenticationStatusCode
.MessageAltered;
407
NegState.AcceptCompleted =>
NegotiateAuthenticationStatusCode
.Completed,
408
NegState.AcceptIncomplete =>
NegotiateAuthenticationStatusCode
.ContinueNeeded,
409
NegState.Reject =>
NegotiateAuthenticationStatusCode
.UnknownCredentials,
410
_ =>
NegotiateAuthenticationStatusCode
.GenericFailure
416
public override
NegotiateAuthenticationStatusCode
Wrap(ReadOnlySpan<byte> input, IBufferWriter<byte> outputWriter, bool requestEncryption, out bool isEncrypted)
426
public override
NegotiateAuthenticationStatusCode
Unwrap(ReadOnlySpan<byte> input, IBufferWriter<byte> outputWriter, out bool wasEncrypted)
436
public override
NegotiateAuthenticationStatusCode
UnwrapInPlace(Span<byte> input, out int unwrappedOffset, out int unwrappedLength, out bool wasEncrypted)
System\Net\NegotiateAuthenticationPal.Unix.cs (42)
46
NegotiateAuthenticationStatusCode
statusCode =
NegotiateAuthenticationStatusCode
.Unsupported;
51
if (statusCode <=
NegotiateAuthenticationStatusCode
.GenericFailure)
53
statusCode =
NegotiateAuthenticationStatusCode
.Unsupported;
71
NegotiateAuthenticationStatusCode
statusCode =
NegotiateAuthenticationStatusCode
.Unsupported;
76
if (statusCode <=
NegotiateAuthenticationStatusCode
.GenericFailure)
78
statusCode =
NegotiateAuthenticationStatusCode
.Unsupported;
262
public override byte[]? GetOutgoingBlob(ReadOnlySpan<byte> incomingBlob, out
NegotiateAuthenticationStatusCode
statusCode)
297
if (statusCode >=
NegotiateAuthenticationStatusCode
.GenericFailure)
311
if (statusCode ==
NegotiateAuthenticationStatusCode
.Completed)
326
public override
NegotiateAuthenticationStatusCode
Wrap(ReadOnlySpan<byte> input, IBufferWriter<byte> outputWriter, bool requestEncryption, out bool isEncrypted)
344
return
NegotiateAuthenticationStatusCode
.GenericFailure;
349
return
NegotiateAuthenticationStatusCode
.Completed;
357
public override
NegotiateAuthenticationStatusCode
Unwrap(ReadOnlySpan<byte> input, IBufferWriter<byte> outputWriter, out bool wasEncrypted)
370
Interop.NetSecurityNative.Status.GSS_S_BAD_SIG =>
NegotiateAuthenticationStatusCode
.MessageAltered,
371
_ =>
NegotiateAuthenticationStatusCode
.InvalidToken
377
return
NegotiateAuthenticationStatusCode
.Completed;
385
public override unsafe
NegotiateAuthenticationStatusCode
UnwrapInPlace(Span<byte> input, out int unwrappedOffset, out int unwrappedLength, out bool wasEncrypted)
400
Interop.NetSecurityNative.Status.GSS_S_BAD_SIG =>
NegotiateAuthenticationStatusCode
.MessageAltered,
401
_ =>
NegotiateAuthenticationStatusCode
.InvalidToken
408
return
NegotiateAuthenticationStatusCode
.Completed;
542
private
NegotiateAuthenticationStatusCode
InitializeSecurityContext(
648
NegotiateAuthenticationStatusCode
.Completed :
649
NegotiateAuthenticationStatusCode
.ContinueNeeded;
654
return
NegotiateAuthenticationStatusCode
.GenericFailure;
662
private
NegotiateAuthenticationStatusCode
AcceptSecurityContext(
704
NegotiateAuthenticationStatusCode
errorCode;
715
errorCode =
NegotiateAuthenticationStatusCode
.Completed;
719
errorCode =
NegotiateAuthenticationStatusCode
.ContinueNeeded;
728
return
NegotiateAuthenticationStatusCode
.GenericFailure;
737
internal static
NegotiateAuthenticationStatusCode
GetErrorCode(Interop.NetSecurityNative.GssApiException exception)
742
return
NegotiateAuthenticationStatusCode
.UnknownCredentials;
744
return
NegotiateAuthenticationStatusCode
.BadBinding;
746
return
NegotiateAuthenticationStatusCode
.CredentialsExpired;
748
return
NegotiateAuthenticationStatusCode
.InvalidToken;
750
return
NegotiateAuthenticationStatusCode
.InvalidCredentials;
752
return
NegotiateAuthenticationStatusCode
.MessageAltered;
755
return
NegotiateAuthenticationStatusCode
.Unsupported;
761
return
NegotiateAuthenticationStatusCode
.TargetUnknown;
763
return
NegotiateAuthenticationStatusCode
.GenericFailure;
766
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 (27)
217
/// Successful step of the authentication returns either <see cref="
NegotiateAuthenticationStatusCode
.Completed" />
218
/// or <see cref="
NegotiateAuthenticationStatusCode
.ContinueNeeded" /> status codes.
221
/// When <see cref="
NegotiateAuthenticationStatusCode
.ContinueNeeded" /> is returned the
224
public byte[]? GetOutgoingBlob(ReadOnlySpan<byte> incomingBlob, out
NegotiateAuthenticationStatusCode
statusCode)
234
if (statusCode ==
NegotiateAuthenticationStatusCode
.Completed)
238
statusCode =
NegotiateAuthenticationStatusCode
.TargetUnknown;
242
statusCode =
NegotiateAuthenticationStatusCode
.ImpersonationValidationFailed;
246
statusCode =
NegotiateAuthenticationStatusCode
.SecurityQosFailed;
250
statusCode =
NegotiateAuthenticationStatusCode
.SecurityQosFailed;
267
/// Successful step of the authentication returns either <see cref="
NegotiateAuthenticationStatusCode
.Completed" />
268
/// or <see cref="
NegotiateAuthenticationStatusCode
.ContinueNeeded" /> status codes.
271
/// When <see cref="
NegotiateAuthenticationStatusCode
.ContinueNeeded" /> is returned the
274
public string? GetOutgoingBlob(string? incomingBlob, out
NegotiateAuthenticationStatusCode
statusCode)
285
statusCode =
NegotiateAuthenticationStatusCode
.InvalidToken;
319
/// <see cref="
NegotiateAuthenticationStatusCode
.Completed" /> on success, other
320
/// <see cref="
NegotiateAuthenticationStatusCode
" /> values on failure.
329
public
NegotiateAuthenticationStatusCode
Wrap(ReadOnlySpan<byte> input, IBufferWriter<byte> outputWriter, bool requestEncryption, out bool isEncrypted)
348
/// <see cref="
NegotiateAuthenticationStatusCode
.Completed" /> on success.
349
/// <see cref="
NegotiateAuthenticationStatusCode
.MessageAltered" /> if the message signature was
351
/// <see cref="
NegotiateAuthenticationStatusCode
.InvalidToken" /> if the wrapped message was
353
/// Other <see cref="
NegotiateAuthenticationStatusCode
" /> values on failure.
356
public
NegotiateAuthenticationStatusCode
Unwrap(ReadOnlySpan<byte> input, IBufferWriter<byte> outputWriter, out bool wasEncrypted)
376
/// <see cref="
NegotiateAuthenticationStatusCode
.Completed" /> on success.
377
/// <see cref="
NegotiateAuthenticationStatusCode
.MessageAltered" /> if the message signature was
379
/// <see cref="
NegotiateAuthenticationStatusCode
.InvalidToken" /> if the wrapped message was
381
/// Other <see cref="
NegotiateAuthenticationStatusCode
" /> values on failure.
384
public
NegotiateAuthenticationStatusCode
UnwrapInPlace(Span<byte> input, out int unwrappedOffset, out int unwrappedLength, out bool wasEncrypted)
System\Net\Security\NegotiateStream.cs (31)
394
NegotiateAuthenticationStatusCode
statusCode;
405
statusCode =
NegotiateAuthenticationStatusCode
.InvalidToken;
411
statusCode =
NegotiateAuthenticationStatusCode
.Completed;
419
if (statusCode !=
NegotiateAuthenticationStatusCode
.Completed)
528
NegotiateAuthenticationStatusCode
statusCode;
536
statusCode =
NegotiateAuthenticationStatusCode
.Completed;
543
if (statusCode !=
NegotiateAuthenticationStatusCode
.Completed)
761
NegotiateAuthenticationStatusCode
statusCode =
NegotiateAuthenticationStatusCode
.Completed;
767
if (statusCode is
NegotiateAuthenticationStatusCode
.BadBinding or
768
NegotiateAuthenticationStatusCode
.TargetUnknown or
769
NegotiateAuthenticationStatusCode
.ImpersonationValidationFailed or
770
NegotiateAuthenticationStatusCode
.SecurityQosFailed)
774
NegotiateAuthenticationStatusCode
.BadBinding =>
776
NegotiateAuthenticationStatusCode
.TargetUnknown =>
778
NegotiateAuthenticationStatusCode
.ImpersonationValidationFailed =>
790
else if (statusCode ==
NegotiateAuthenticationStatusCode
.Completed)
820
else if (statusCode !=
NegotiateAuthenticationStatusCode
.ContinueNeeded)
824
NegotiateAuthenticationStatusCode
.BadBinding => (int)Interop.SECURITY_STATUS.BadBinding,
825
NegotiateAuthenticationStatusCode
.Unsupported => (int)Interop.SECURITY_STATUS.Unsupported,
826
NegotiateAuthenticationStatusCode
.MessageAltered => (int)Interop.SECURITY_STATUS.MessageAltered,
827
NegotiateAuthenticationStatusCode
.ContextExpired => (int)Interop.SECURITY_STATUS.ContextExpired,
828
NegotiateAuthenticationStatusCode
.CredentialsExpired => (int)Interop.SECURITY_STATUS.CertExpired,
829
NegotiateAuthenticationStatusCode
.InvalidCredentials => (int)Interop.SECURITY_STATUS.LogonDenied,
830
NegotiateAuthenticationStatusCode
.InvalidToken => (int)Interop.SECURITY_STATUS.InvalidToken,
831
NegotiateAuthenticationStatusCode
.UnknownCredentials => (int)Interop.SECURITY_STATUS.UnknownCredentials,
832
NegotiateAuthenticationStatusCode
.QopNotSupported => (int)Interop.SECURITY_STATUS.QopNotSupported,
833
NegotiateAuthenticationStatusCode
.OutOfSequence => (int)Interop.SECURITY_STATUS.OutOfSequence,
839
NegotiateAuthenticationStatusCode
.InvalidCredentials =>
895
_context.GetOutgoingBlob(message, out
NegotiateAuthenticationStatusCode
statusCode);
896
_remoteOk = statusCode is
NegotiateAuthenticationStatusCode
.Completed;