use of com.microsoft.appcenter.sasquatch.MSAAuthenticationProvider in project appcenter-sdk-android by microsoft.
the class MSALoginActivity method registerAppCenterAuthentication.
private void registerAppCenterAuthentication(String userId) {
sSharedPreferences.edit().putString(MSA_REFRESH_TOKEN_SCOPE_KEY, mRefreshTokenScope).apply();
sSharedPreferences.edit().putString(MSA_REFRESH_TOKEN_KEY, mRefreshToken).apply();
sSharedPreferences.edit().putInt(MSA_AUTH_TYPE_KEY, mAuthType.ordinal()).apply();
sSharedPreferences.edit().putString(MSA_TOKEN_KEY, userId).apply();
MSAAuthenticationProvider tokenProvider = MSAAuthenticationProvider.getInstance(mRefreshToken, mRefreshTokenScope, this);
AuthenticationProvider provider = new AuthenticationProvider(mAuthType, userId, tokenProvider);
AnalyticsTransmissionTarget.addAuthenticationProvider(provider);
finish();
Toast.makeText(this, R.string.signed_in, Toast.LENGTH_SHORT).show();
}
Aggregations