Improve logging #43

Merged
s416204 merged 1 commits from approximated-localizations into develop 2018-11-21 08:37:49 +01:00

View File

@ -182,12 +182,10 @@ public class LoginActivity extends AppCompatActivity {
Claim userId = jwt.getClaim("nameid");
Claim role = jwt.getClaim("http://schemas.microsoft.com/ws/2008/06/identity/claims/role");
if(Objects.requireNonNull(role.asString()).equals("Student")){
PrefUtils.storeIsTutor(getApplicationContext(), false);
if(!Objects.requireNonNull(role.asString()).equals("Student")){
PrefUtils.storeIsTutor(getApplicationContext(), true);
}
Log.e("LOGOWANIE",role.asString());
PrefUtils.storeIsLoggedIn(getApplicationContext(), true);
PrefUtils.storeApiKey(getApplicationContext(), token);
PrefUtils.storeUserId(getApplicationContext(), userId.asString());