Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ TryGetValidAuthenticationChallengeForScheme()

static bool System.Net.Http.AuthenticationHelper.TryGetValidAuthenticationChallengeForScheme ( string scheme,
AuthenticationType authenticationType,
Uri uri,
ICredentials credentials,
HttpHeaderValueCollection< AuthenticationHeaderValue > authenticationHeaderValues,
out AuthenticationChallenge challenge )
inlinestaticprivate

Definition at line 240 of file AuthenticationHelper.cs.

241 {
242 challenge = default(AuthenticationChallenge);
244 {
245 return false;
246 }
247 NetworkCredential credential = credentials.GetCredential(uri, scheme);
248 if (credential == null)
249 {
250 if (System.Net.NetEventSource.Log.IsEnabled())
251 {
252 System.Net.NetEventSource.AuthenticationInfo(uri, "Authentication scheme '" + scheme + "' supported by server, but not by client.");
253 }
254 return false;
255 }
256 challenge = new AuthenticationChallenge(authenticationType, scheme, credential, challengeData);
257 if (System.Net.NetEventSource.Log.IsEnabled())
258 {
259 System.Net.NetEventSource.AuthenticationInfo(uri, "Authentication scheme '" + scheme + "' selected. Client username=" + challenge.Credential.UserName);
260 }
261 return true;
262 }
static bool TryGetChallengeDataForScheme(string scheme, HttpHeaderValueCollection< AuthenticationHeaderValue > authenticationHeaderValues, out string challengeData)
static readonly System.Net.NetEventSource Log
static void AuthenticationInfo(Uri uri, string message)

References System.Net.NetEventSource.AuthenticationInfo(), System.Net.NetEventSource.Log, and System.Net.Http.AuthenticationHelper.TryGetChallengeDataForScheme().

Referenced by System.Net.Http.AuthenticationHelper.TryGetAuthenticationChallenge().