Improve logging

This commit is contained in:
Mieszko Wrzeszczyński 2018-11-21 08:37:23 +01:00
parent 18841ab372
commit b75e3e5ae3

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());