@Test public void refresh() { assertEquals(TOKEN, authenticationProvider.refresh()); }
@Override public String refresh() { Logger.info(this, "Refreshing Cognito Token"); setToken(null); final Cognito cognito = cognitoIdentityProvider.synchronouslyRefreshCognitoToken(); Logger.debug(this, "Refreshed cognito token is null? {}", cognito == null); final String identityId = cognito != null ? cognito.getIdentityId() : null; final String token = cognito != null ? cognito.getCognitoToken() : null; update(identityId, token); return token; }
SmartReceiptsAuthenticationProvider extends AWSAbstractCognitoDeveloperIdentityProvider { @Override public String refresh() { Logger.info(this, "Refreshing Cognito Token"); setToken(null); final Cognito cognito = cognitoIdentityProvider.synchronouslyRefreshCognitoToken(); Logger.debug(this, "Refreshed cognito token is null? {}", cognito == null); final String identityId = cognito != null ? cognito.getIdentityId() : null; final String token = cognito != null ? cognito.getCognitoToken() : null; update(identityId, token); return token; } }
SmartReceiptsAuthenticationProvider extends AWSAbstractCognitoDeveloperIdentityProvider { @Override public String refresh() { Logger.info(this, "Refreshing Cognito Token"); setToken(null); final Cognito cognito = cognitoIdentityProvider.synchronouslyRefreshCognitoToken(); Logger.debug(this, "Refreshed cognito token is null? {}", cognito == null); final String identityId = cognito != null ? cognito.getIdentityId() : null; final String token = cognito != null ? cognito.getCognitoToken() : null; update(identityId, token); return token; } SmartReceiptsAuthenticationProvider(@NonNull CognitoIdentityProvider cognitoIdentityProvider, @NonNull Regions regions); }
SmartReceiptsAuthenticationProvider extends AWSAbstractCognitoDeveloperIdentityProvider { @Override public String refresh() { Logger.info(this, "Refreshing Cognito Token"); setToken(null); final Cognito cognito = cognitoIdentityProvider.synchronouslyRefreshCognitoToken(); Logger.debug(this, "Refreshed cognito token is null? {}", cognito == null); final String identityId = cognito != null ? cognito.getIdentityId() : null; final String token = cognito != null ? cognito.getCognitoToken() : null; update(identityId, token); return token; } SmartReceiptsAuthenticationProvider(@NonNull CognitoIdentityProvider cognitoIdentityProvider, @NonNull Regions regions); @Override String getProviderName(); @Override String refresh(); @Override String getIdentityId(); }
SmartReceiptsAuthenticationProvider extends AWSAbstractCognitoDeveloperIdentityProvider { @Override public String refresh() { Logger.info(this, "Refreshing Cognito Token"); setToken(null); final Cognito cognito = cognitoIdentityProvider.synchronouslyRefreshCognitoToken(); Logger.debug(this, "Refreshed cognito token is null? {}", cognito == null); final String identityId = cognito != null ? cognito.getIdentityId() : null; final String token = cognito != null ? cognito.getCognitoToken() : null; update(identityId, token); return token; } SmartReceiptsAuthenticationProvider(@NonNull CognitoIdentityProvider cognitoIdentityProvider, @NonNull Regions regions); @Override String getProviderName(); @Override String refresh(); @Override String getIdentityId();  }