185 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 (159)
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)
194
statusCode ==
NegotiateAuthenticationStatusCode
.Unsupported ||
195
(LocalAppContextSwitches.IsOpenBsd && statusCode ==
NegotiateAuthenticationStatusCode
.UnknownCredentials);
223
statusCode =
NegotiateAuthenticationStatusCode
.ContinueNeeded;
227
private byte[]? ProcessSpNegoChallenge(ReadOnlySpan<byte> challenge, out
NegotiateAuthenticationStatusCode
statusCode)
289
statusCode =
NegotiateAuthenticationStatusCode
.InvalidToken;
305
statusCode =
NegotiateAuthenticationStatusCode
.Unsupported;
327
statusCode =
NegotiateAuthenticationStatusCode
.InvalidToken;
337
if (statusCode !=
NegotiateAuthenticationStatusCode
.ContinueNeeded &&
338
statusCode !=
NegotiateAuthenticationStatusCode
.Completed)
356
if (statusCode ==
NegotiateAuthenticationStatusCode
.Completed)
368
statusCode = state == NegState.RequestMic ?
NegotiateAuthenticationStatusCode
.ContinueNeeded :
NegotiateAuthenticationStatusCode
.Completed;
369
_isAuthenticated = statusCode ==
NegotiateAuthenticationStatusCode
.Completed;
391
statusCode =
NegotiateAuthenticationStatusCode
.GenericFailure;
397
statusCode =
NegotiateAuthenticationStatusCode
.MessageAltered;
406
NegState.AcceptCompleted =>
NegotiateAuthenticationStatusCode
.Completed,
407
NegState.AcceptIncomplete =>
NegotiateAuthenticationStatusCode
.ContinueNeeded,
408
NegState.Reject =>
NegotiateAuthenticationStatusCode
.UnknownCredentials,
409
_ =>
NegotiateAuthenticationStatusCode
.GenericFailure
415
public override
NegotiateAuthenticationStatusCode
Wrap(ReadOnlySpan<byte> input, IBufferWriter<byte> outputWriter, bool requestEncryption, out bool isEncrypted)
425
public override
NegotiateAuthenticationStatusCode
Unwrap(ReadOnlySpan<byte> input, IBufferWriter<byte> outputWriter, out bool wasEncrypted)
435
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)
298
if (statusCode >=
NegotiateAuthenticationStatusCode
.GenericFailure)
312
if (statusCode ==
NegotiateAuthenticationStatusCode
.Completed)
327
public override
NegotiateAuthenticationStatusCode
Wrap(ReadOnlySpan<byte> input, IBufferWriter<byte> outputWriter, bool requestEncryption, out bool isEncrypted)
345
return
NegotiateAuthenticationStatusCode
.GenericFailure;
350
return
NegotiateAuthenticationStatusCode
.Completed;
358
public override
NegotiateAuthenticationStatusCode
Unwrap(ReadOnlySpan<byte> input, IBufferWriter<byte> outputWriter, out bool wasEncrypted)
371
Interop.NetSecurityNative.Status.GSS_S_BAD_SIG =>
NegotiateAuthenticationStatusCode
.MessageAltered,
372
_ =>
NegotiateAuthenticationStatusCode
.InvalidToken
378
return
NegotiateAuthenticationStatusCode
.Completed;
386
public override unsafe
NegotiateAuthenticationStatusCode
UnwrapInPlace(Span<byte> input, out int unwrappedOffset, out int unwrappedLength, out bool wasEncrypted)
401
Interop.NetSecurityNative.Status.GSS_S_BAD_SIG =>
NegotiateAuthenticationStatusCode
.MessageAltered,
402
_ =>
NegotiateAuthenticationStatusCode
.InvalidToken
409
return
NegotiateAuthenticationStatusCode
.Completed;
543
private unsafe
NegotiateAuthenticationStatusCode
InitializeSecurityContext(
656
NegotiateAuthenticationStatusCode
.Completed :
657
NegotiateAuthenticationStatusCode
.ContinueNeeded;
662
return
NegotiateAuthenticationStatusCode
.GenericFailure;
670
private
NegotiateAuthenticationStatusCode
AcceptSecurityContext(
711
NegotiateAuthenticationStatusCode
errorCode;
722
errorCode =
NegotiateAuthenticationStatusCode
.Completed;
726
errorCode =
NegotiateAuthenticationStatusCode
.ContinueNeeded;
735
return
NegotiateAuthenticationStatusCode
.GenericFailure;
744
internal static
NegotiateAuthenticationStatusCode
GetErrorCode(Interop.NetSecurityNative.GssApiException exception)
749
return
NegotiateAuthenticationStatusCode
.UnknownCredentials;
751
return
NegotiateAuthenticationStatusCode
.BadBinding;
753
return
NegotiateAuthenticationStatusCode
.CredentialsExpired;
755
return
NegotiateAuthenticationStatusCode
.InvalidToken;
757
return
NegotiateAuthenticationStatusCode
.InvalidCredentials;
759
return
NegotiateAuthenticationStatusCode
.MessageAltered;
762
return
NegotiateAuthenticationStatusCode
.Unsupported;
768
return
NegotiateAuthenticationStatusCode
.TargetUnknown;
770
return
NegotiateAuthenticationStatusCode
.GenericFailure;
773
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 (26)
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)
265
statusCode =
NegotiateAuthenticationStatusCode
.InvalidToken;
299
/// <see cref="
NegotiateAuthenticationStatusCode
.Completed" /> on success, other
300
/// <see cref="
NegotiateAuthenticationStatusCode
" /> values on failure.
309
public
NegotiateAuthenticationStatusCode
Wrap(ReadOnlySpan<byte> input, IBufferWriter<byte> outputWriter, bool requestEncryption, out bool isEncrypted)
328
/// <see cref="
NegotiateAuthenticationStatusCode
.Completed" /> on success.
329
/// <see cref="
NegotiateAuthenticationStatusCode
.MessageAltered" /> if the message signature was
331
/// <see cref="
NegotiateAuthenticationStatusCode
.InvalidToken" /> if the wrapped message was
333
/// Other <see cref="
NegotiateAuthenticationStatusCode
" /> values on failure.
336
public
NegotiateAuthenticationStatusCode
Unwrap(ReadOnlySpan<byte> input, IBufferWriter<byte> outputWriter, out bool wasEncrypted)
356
/// <see cref="
NegotiateAuthenticationStatusCode
.Completed" /> on success.
357
/// <see cref="
NegotiateAuthenticationStatusCode
.MessageAltered" /> if the message signature was
359
/// <see cref="
NegotiateAuthenticationStatusCode
.InvalidToken" /> if the wrapped message was
361
/// Other <see cref="
NegotiateAuthenticationStatusCode
" /> values on failure.
364
public
NegotiateAuthenticationStatusCode
UnwrapInPlace(Span<byte> input, out int unwrappedOffset, out int unwrappedLength, out bool wasEncrypted)
System\Net\Security\NegotiateStream.cs (31)
397
NegotiateAuthenticationStatusCode
statusCode;
408
statusCode =
NegotiateAuthenticationStatusCode
.InvalidToken;
414
statusCode =
NegotiateAuthenticationStatusCode
.Completed;
422
if (statusCode !=
NegotiateAuthenticationStatusCode
.Completed)
531
NegotiateAuthenticationStatusCode
statusCode;
539
statusCode =
NegotiateAuthenticationStatusCode
.Completed;
546
if (statusCode !=
NegotiateAuthenticationStatusCode
.Completed)
763
NegotiateAuthenticationStatusCode
statusCode =
NegotiateAuthenticationStatusCode
.Completed;
769
if (statusCode is
NegotiateAuthenticationStatusCode
.BadBinding or
770
NegotiateAuthenticationStatusCode
.TargetUnknown or
771
NegotiateAuthenticationStatusCode
.ImpersonationValidationFailed or
772
NegotiateAuthenticationStatusCode
.SecurityQosFailed)
776
NegotiateAuthenticationStatusCode
.BadBinding =>
778
NegotiateAuthenticationStatusCode
.TargetUnknown =>
780
NegotiateAuthenticationStatusCode
.ImpersonationValidationFailed =>
792
else if (statusCode ==
NegotiateAuthenticationStatusCode
.Completed)
822
else if (statusCode !=
NegotiateAuthenticationStatusCode
.ContinueNeeded)
826
NegotiateAuthenticationStatusCode
.BadBinding => (int)Interop.SECURITY_STATUS.BadBinding,
827
NegotiateAuthenticationStatusCode
.Unsupported => (int)Interop.SECURITY_STATUS.Unsupported,
828
NegotiateAuthenticationStatusCode
.MessageAltered => (int)Interop.SECURITY_STATUS.MessageAltered,
829
NegotiateAuthenticationStatusCode
.ContextExpired => (int)Interop.SECURITY_STATUS.ContextExpired,
830
NegotiateAuthenticationStatusCode
.CredentialsExpired => (int)Interop.SECURITY_STATUS.CertExpired,
831
NegotiateAuthenticationStatusCode
.InvalidCredentials => (int)Interop.SECURITY_STATUS.LogonDenied,
832
NegotiateAuthenticationStatusCode
.InvalidToken => (int)Interop.SECURITY_STATUS.InvalidToken,
833
NegotiateAuthenticationStatusCode
.UnknownCredentials => (int)Interop.SECURITY_STATUS.UnknownCredentials,
834
NegotiateAuthenticationStatusCode
.QopNotSupported => (int)Interop.SECURITY_STATUS.QopNotSupported,
835
NegotiateAuthenticationStatusCode
.OutOfSequence => (int)Interop.SECURITY_STATUS.OutOfSequence,
841
NegotiateAuthenticationStatusCode
.InvalidCredentials =>
897
_context.GetOutgoingBlob(message, out
NegotiateAuthenticationStatusCode
statusCode);
898
_remoteOk = statusCode is
NegotiateAuthenticationStatusCode
.Completed;