@Test public void testIsInvalidBothProviders() { assertFalse(service.validate(INVALID_IDENTIFYING_TOKEN, CHARGING_STATION_ID).isValid()); }
@Override public IdentifyingToken validate(IdentifyingToken token, @Nullable ChargingStationId chargingStationId) { for (AuthorizationProvider provider : providers) { IdentifyingToken validatedToken = provider.validate(token, chargingStationId); if (validatedToken.isValid()) { return validatedToken; } } return token; }
SequentialIdentificationAuthorizationService implements IdentificationAuthorizationService { @Override public IdentifyingToken validate(IdentifyingToken token, @Nullable ChargingStationId chargingStationId) { for (AuthorizationProvider provider : providers) { IdentifyingToken validatedToken = provider.validate(token, chargingStationId); if (validatedToken.isValid()) { return validatedToken; } } return token; } }
SequentialIdentificationAuthorizationService implements IdentificationAuthorizationService { @Override public IdentifyingToken validate(IdentifyingToken token, @Nullable ChargingStationId chargingStationId) { for (AuthorizationProvider provider : providers) { IdentifyingToken validatedToken = provider.validate(token, chargingStationId); if (validatedToken.isValid()) { return validatedToken; } } return token; }  }
SequentialIdentificationAuthorizationService implements IdentificationAuthorizationService { @Override public IdentifyingToken validate(IdentifyingToken token, @Nullable ChargingStationId chargingStationId) { for (AuthorizationProvider provider : providers) { IdentifyingToken validatedToken = provider.validate(token, chargingStationId); if (validatedToken.isValid()) { return validatedToken; } } return token; }  void setProviders(Set<AuthorizationProvider> providers); @Override IdentifyingToken validate(IdentifyingToken token, @Nullable ChargingStationId chargingStationId); }
SequentialIdentificationAuthorizationService implements IdentificationAuthorizationService { @Override public IdentifyingToken validate(IdentifyingToken token, @Nullable ChargingStationId chargingStationId) { for (AuthorizationProvider provider : providers) { IdentifyingToken validatedToken = provider.validate(token, chargingStationId); if (validatedToken.isValid()) { return validatedToken; } } return token; }  void setProviders(Set<AuthorizationProvider> providers); @Override IdentifyingToken validate(IdentifyingToken token, @Nullable ChargingStationId chargingStationId);  }