Commit 8bfcaa53 authored by Roman Sorokin's avatar Roman Sorokin Committed by Commit Bot

Chromad: Set proper IsUsingOAuth in UserContext

BUG=chromium:907504
TEST=manual

Change-Id: I8b9bad1f16fe539b7e25134b5fdc0d7dd63094a8
Reviewed-on: https://chromium-review.googlesource.com/c/1349323Reviewed-by: default avatarJacob Dufault <jdufault@chromium.org>
Commit-Queue: Roman Sorokin <rsorokin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612136}
parent 501ad812
...@@ -363,12 +363,14 @@ void LoginDisplayHostMojo::HandleAuthenticateUserWithPasswordOrPin( ...@@ -363,12 +363,14 @@ void LoginDisplayHostMojo::HandleAuthenticateUserWithPasswordOrPin(
// //
// More details can be found in https://crbug.com/386606 // More details can be found in https://crbug.com/386606
user_context.SetPasswordKey(Key(password)); user_context.SetPasswordKey(Key(password));
if (account_id.GetAccountType() == AccountType::ACTIVE_DIRECTORY && if (account_id.GetAccountType() == AccountType::ACTIVE_DIRECTORY) {
(user_context.GetUserType() != if (user_context.GetUserType() !=
user_manager::UserType::USER_TYPE_ACTIVE_DIRECTORY)) { user_manager::UserType::USER_TYPE_ACTIVE_DIRECTORY) {
LOG(FATAL) << "Incorrect Active Directory user type " LOG(FATAL) << "Incorrect Active Directory user type "
<< user_context.GetUserType(); << user_context.GetUserType();
} }
user_context.SetIsUsingOAuth(false);
}
existing_user_controller_->Login(user_context, chromeos::SigninSpecifics()); existing_user_controller_->Login(user_context, chromeos::SigninSpecifics());
} }
......
...@@ -1220,12 +1220,14 @@ void SigninScreenHandler::AuthenticateExistingUser(const AccountId& account_id, ...@@ -1220,12 +1220,14 @@ void SigninScreenHandler::AuthenticateExistingUser(const AccountId& account_id,
// network. See https://crbug.com/386606 for details. // network. See https://crbug.com/386606 for details.
user_context.SetPasswordKey(Key(password)); user_context.SetPasswordKey(Key(password));
user_context.SetIsUsingPin(authenticated_by_pin); user_context.SetIsUsingPin(authenticated_by_pin);
if (account_id.GetAccountType() == AccountType::ACTIVE_DIRECTORY && if (account_id.GetAccountType() == AccountType::ACTIVE_DIRECTORY) {
(user_context.GetUserType() != if (user_context.GetUserType() !=
user_manager::UserType::USER_TYPE_ACTIVE_DIRECTORY)) { user_manager::UserType::USER_TYPE_ACTIVE_DIRECTORY) {
LOG(FATAL) << "Incorrect Active Directory user type " LOG(FATAL) << "Incorrect Active Directory user type "
<< user_context.GetUserType(); << user_context.GetUserType();
} }
user_context.SetIsUsingOAuth(false);
}
delegate_->Login(user_context, SigninSpecifics()); delegate_->Login(user_context, SigninSpecifics());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment