class AuthenticationSchemeFactory {

    public AbstractAuthenticationScheme getSchema(AuthenticationScheme scheme) {
        if (scheme == null) return defaultScheme;

        final AbstractAuthenticationScheme output = map.get(scheme);
        if (output == null) {
            throw new IllegalArgumentException("Unknown scheme : " + scheme);
        }
        return output;
    }

    public  AuthenticationSchemeFactory(@Autowired AuthenticationService authenticationService, @Autowired List<AbstractAuthenticationScheme> schemes);

}