use of org.edx.mobile.authentication.LoginService in project edx-app-android by edx.
the class OauthRefreshTokenAuthenticator method refreshAccessToken.
@NonNull
private AuthResponse refreshAccessToken(AuthResponse currentAuth) throws IOException, HttpStatusException {
// RoboGuice doesn't seem to allow this to be injected via annotation at initialization
// time. TODO: Investigate whether this is a bug in RoboGuice.
LoginService loginService = RoboGuice.getInjector(context).getInstance(RetrofitProvider.class).getNonOAuthBased().create(LoginService.class);
AuthResponse refreshTokenData = executeStrict(loginService.refreshAccessToken("refresh_token", config.getOAuthClientId(), currentAuth.refresh_token));
loginPrefs.storeRefreshTokenResponse(refreshTokenData);
return refreshTokenData;
}
Aggregations