class CognitoIdentityProvider {

    @Nullable
    public Cognito synchronouslyRefreshCognitoToken() {
        try {
            return refreshCognitoToken()
                    .onErrorReturn(throwable -> Optional.absent())
                    .blockingGet().get();
        } catch (Exception e) {
            return null;
        }
    }

    @Inject public  CognitoIdentityProvider(@NonNull IdentityManager identityManager,
                                   @NonNull LocalCognitoTokenStore localCognitoTokenStore);

}