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

◆ Authenticate()

Authorization System.Net.Mail.SmtpLoginAuthenticationModule.Authenticate ( string challenge,
NetworkCredential credential,
object sessionCookie,
string spn,
ChannelBinding channelBindingToken )
inline

Implements System.Net.Mail.ISmtpAuthenticationModule.

Definition at line 17 of file SmtpLoginAuthenticationModule.cs.

18 {
20 {
22 {
23 if (credential == null || credential == CredentialCache.DefaultNetworkCredentials)
24 {
25 return null;
26 }
28 string text = credential.UserName;
29 string domain = credential.Domain;
30 if (domain != null && domain.Length > 0)
31 {
32 text = domain + "\\" + text;
33 }
34 return new Authorization(Convert.ToBase64String(Encoding.UTF8.GetBytes(text)), finished: false);
35 }
37 return new Authorization(Convert.ToBase64String(Encoding.UTF8.GetBytes(value.Password)), finished: true);
38 }
39 }
bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
bool ICollection< KeyValuePair< TKey, TValue > >. Remove(KeyValuePair< TKey, TValue > keyValuePair)
readonly Dictionary< object, NetworkCredential > _sessions
static Encoding UTF8
Definition Encoding.cs:526

References System.Net.Mail.SmtpLoginAuthenticationModule._sessions, System.Net.Authorization, System.Net.CredentialCache.DefaultNetworkCredentials, System.Collections.Generic.Dictionary< TKey, TValue >.Remove(), System.text, System.Convert.ToBase64String(), System.Collections.Generic.Dictionary< TKey, TValue >.TryGetValue(), System.Text.Encoding.UTF8, and System.value.