Bug 1503053 - Port bug 1502774, part 2: Replace XPCOM use of auth module classes. r=darktrojan
This commit is contained in:
Родитель
8c809bbfde
Коммит
22d98165ad
|
@ -264,8 +264,7 @@ NS_IMETHODIMP nsAbLDAPListenerBase::OnLDAPInit(nsILDAPConnection *aConn, nsresul
|
|||
service.InsertLiteral("ldap@", 0);
|
||||
|
||||
nsCOMPtr<nsIAuthModule> authModule =
|
||||
do_CreateInstance(NS_AUTH_MODULE_CONTRACTID_PREFIX "sasl-gssapi", &rv);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
nsIAuthModule::CreateInstance("sasl-gssapi");
|
||||
|
||||
rv = mOperation->SaslBind(service, mSaslMechanism, authModule);
|
||||
if (NS_FAILED(rv))
|
||||
|
|
|
@ -862,8 +862,7 @@ nsresult nsMsgProtocol::DoGSSAPIStep1(const char *service, const char *username,
|
|||
#endif
|
||||
|
||||
// if this fails, then it means that we cannot do GSSAPI SASL.
|
||||
m_authModule = do_CreateInstance(NS_AUTH_MODULE_CONTRACTID_PREFIX "sasl-gssapi", &rv);
|
||||
NS_ENSURE_SUCCESS(rv,rv);
|
||||
m_authModule = nsIAuthModule::CreateInstance("sasl-gssapi");
|
||||
|
||||
m_authModule->Init(service, nsIAuthModule::REQ_DEFAULT, nullptr, NS_ConvertUTF8toUTF16(username).get(), nullptr);
|
||||
|
||||
|
@ -954,10 +953,7 @@ nsresult nsMsgProtocol::DoNtlmStep1(const nsACString &username, const nsAString
|
|||
{
|
||||
nsresult rv;
|
||||
|
||||
m_authModule = do_CreateInstance(NS_AUTH_MODULE_CONTRACTID_PREFIX "ntlm", &rv);
|
||||
// if this fails, then it means that we cannot do NTLM auth.
|
||||
if (NS_FAILED(rv) || !m_authModule)
|
||||
return rv;
|
||||
m_authModule = nsIAuthModule::CreateInstance("ntlm");
|
||||
|
||||
m_authModule->Init(nullptr, 0, nullptr, NS_ConvertUTF8toUTF16(username).get(),
|
||||
PromiseFlatString(password).get());
|
||||
|
|
Загрузка…
Ссылка в новой задаче