class LocalCognitoTokenStore {

    @Nullable
    public Cognito getCognitoToken() {
        final SharedPreferences preferences = sharedPreferences.get();
        final String token = preferences.getString(KEY_COGNITO_TOKEN, null);
        final String identityId = preferences.getString(KEY_COGNITO_IDENTITY_ID, null);
        final long expirationTimeStamp = preferences.getLong(KEY_COGNITO_TOKEN_EXPIRATION, -1);
        if (token == null || identityId == null) {
            return null;
        } else {
            return new Cognito(token, identityId, new Date(expirationTimeStamp));
        }
    }

    @Inject public  LocalCognitoTokenStore(@NonNull Lazy<SharedPreferences> sharedPreferences);

}