class JwtSubjectIssuersConfig {

    public static JwtSubjectIssuersConfig fromOAuthConfig(final OAuthConfig config) {
        final Set<JwtSubjectIssuerConfig> configItems =
                // merge the default and extension config
                Stream.concat(config.getOpenIdConnectIssuers().entrySet().stream(),
                        config.getOpenIdConnectIssuersExtension().entrySet().stream())
                        .map(entry -> new JwtSubjectIssuerConfig(entry.getValue(), entry.getKey()))
                        .collect(Collectors.toSet());
        return fromJwtSubjectIssuerConfigs(configItems);
    }

    private  JwtSubjectIssuersConfig(final Iterable<JwtSubjectIssuerConfig> configItems);

}