static ClientAuthConfig newClientAuthConfig()

in geronimo-jaspi/src/main/java/org/apache/geronimo/components/jaspi/impl/ConfigProviderImpl.java [167:182]


    static ClientAuthConfig newClientAuthConfig(ClientAuthConfigType clientAuthConfigType, String messageLayer, String appContext, CallbackHandler callbackHandler) throws AuthException {
        Map<String, ClientAuthContext> authContextMap = new HashMap<String, ClientAuthContext>();
        for (ClientAuthContextType clientAuthContextType: clientAuthConfigType.getClientAuthContext()) {
            if (match(clientAuthContextType, messageLayer, appContext)) {
                ClientAuthContext clientAuthContext = newClientAuthContext(clientAuthContextType, callbackHandler);
                String authContextID = clientAuthContextType.getAuthenticationContextID();
                if (authContextID == null) {
                    authContextID = clientAuthConfigType.getAuthenticationContextID();
                }
                if (!authContextMap.containsKey(authContextID)) {
                    authContextMap.put(authContextID,  clientAuthContext);
                }
            }
        }
        return new ClientAuthConfigImpl(clientAuthConfigType, authContextMap);
    }