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);
|
service.InsertLiteral("ldap@", 0);
|
||||||
|
|
||||||
nsCOMPtr<nsIAuthModule> authModule =
|
nsCOMPtr<nsIAuthModule> authModule =
|
||||||
do_CreateInstance(NS_AUTH_MODULE_CONTRACTID_PREFIX "sasl-gssapi", &rv);
|
nsIAuthModule::CreateInstance("sasl-gssapi");
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
|
||||||
|
|
||||||
rv = mOperation->SaslBind(service, mSaslMechanism, authModule);
|
rv = mOperation->SaslBind(service, mSaslMechanism, authModule);
|
||||||
if (NS_FAILED(rv))
|
if (NS_FAILED(rv))
|
||||||
|
|
|
@ -862,8 +862,7 @@ nsresult nsMsgProtocol::DoGSSAPIStep1(const char *service, const char *username,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// if this fails, then it means that we cannot do GSSAPI SASL.
|
// if this fails, then it means that we cannot do GSSAPI SASL.
|
||||||
m_authModule = do_CreateInstance(NS_AUTH_MODULE_CONTRACTID_PREFIX "sasl-gssapi", &rv);
|
m_authModule = nsIAuthModule::CreateInstance("sasl-gssapi");
|
||||||
NS_ENSURE_SUCCESS(rv,rv);
|
|
||||||
|
|
||||||
m_authModule->Init(service, nsIAuthModule::REQ_DEFAULT, nullptr, NS_ConvertUTF8toUTF16(username).get(), nullptr);
|
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;
|
nsresult rv;
|
||||||
|
|
||||||
m_authModule = do_CreateInstance(NS_AUTH_MODULE_CONTRACTID_PREFIX "ntlm", &rv);
|
m_authModule = nsIAuthModule::CreateInstance("ntlm");
|
||||||
// if this fails, then it means that we cannot do NTLM auth.
|
|
||||||
if (NS_FAILED(rv) || !m_authModule)
|
|
||||||
return rv;
|
|
||||||
|
|
||||||
m_authModule->Init(nullptr, 0, nullptr, NS_ConvertUTF8toUTF16(username).get(),
|
m_authModule->Init(nullptr, 0, nullptr, NS_ConvertUTF8toUTF16(username).get(),
|
||||||
PromiseFlatString(password).get());
|
PromiseFlatString(password).get());
|
||||||
|
|
Загрузка…
Ссылка в новой задаче