1
0
mirror of https://github.com/owncloud/android-library.git synced 2026-08-20 21:02:53 +00:00

Added username to OwnCloudSamlSsoCredentials

This commit is contained in:
David A. Velasco
2015-08-03 11:20:05 +02:00
parent 3b9777c5b6
commit 6752b25b8d
4 changed files with 18 additions and 15 deletions
@@ -167,7 +167,9 @@ public class AccountUtils {
boolean isSamlSso = am.getUserData(
account,
AccountUtils.Constants.KEY_SUPPORTS_SAML_WEB_SSO) != null;
String username = account.name.substring(0, account.name.lastIndexOf('@'));
if (isOauth2) {
String accessToken = am.blockingGetAuthToken(
account,
@@ -182,10 +184,9 @@ public class AccountUtils {
AccountTypeUtils.getAuthTokenTypeSamlSessionCookie(account.type),
false);
credentials = OwnCloudCredentialsFactory.newSamlSsoCredentials(accessToken);
credentials = OwnCloudCredentialsFactory.newSamlSsoCredentials(username, accessToken);
} else {
String username = account.name.substring(0, account.name.lastIndexOf('@'));
String password = am.blockingGetAuthToken(
account,
AccountTypeUtils.getAuthTokenTypePass(account.type),