/** * Obtain the list of available mechanism names after merging the properties. * * @param properties the initial set of properties to pass to the delegate to obtain the mechanism names. * @return the list of authentication mechanisms available form this factory. * @see org.wildfly.security.http.HttpServerAuthenticationMechanismFactory#getMechanismNames(java.util.Map) */ @Override public String[] getMechanismNames(Map<String, ?> properties) { return delegate.getMechanismNames(combine(properties, this.properties)); }
private List<HttpServerAuthenticationMechanism> getAuthenticationMechanisms(Map<String, Map<String, String>> selectedMechanisms) { List<HttpServerAuthenticationMechanism> mechanisms = new ArrayList<>(selectedMechanisms.size()); UnaryOperator<HttpServerAuthenticationMechanismFactory> singleSignOnTransformer = builder.httpAuthenticationFactoryTransformer; for (Entry<String, Map<String, String>> entry : selectedMechanisms.entrySet()) { try { UnaryOperator<HttpServerAuthenticationMechanismFactory> factoryTransformation = f -> { HttpServerAuthenticationMechanismFactory factory = new PropertiesServerMechanismFactory(f, entry.getValue()); return (singleSignOnTransformer != null) ? singleSignOnTransformer.apply(factory) : factory; }; HttpServerAuthenticationMechanism mechanism = builder.httpAuthenticationFactory.createMechanism(entry.getKey(), factoryTransformation); if (mechanism != null) mechanisms.add(mechanism); } catch (HttpAuthenticationException e) { throw new IllegalStateException(e); } } return mechanisms; }
factory = new SetMechanismInformationMechanismFactory(factory); factory = finalFilter != null ? new FilterServerMechanismFactory(factory, finalFilter) : factory; factory = propertiesMap != null ? new PropertiesServerMechanismFactory(factory, propertiesMap) : factory;
/** * Create an instance of the requested {@link HttpServerAuthenticationMechanismFactory}. * * @param mechanismName the name of the mechanism being requested. * @param properties initial properties to be passed into the delegate factory. * @param callbackHandler the {@link CallbackHandler} to use for verification. * @return The newly created {@link HttpServerAuthenticationMechanismFactory}, or {@code null} if not availbale. * @throws HttpAuthenticationException * @see org.wildfly.security.http.HttpServerAuthenticationMechanismFactory#createAuthenticationMechanism(java.lang.String, * java.util.Map, javax.security.auth.callback.CallbackHandler) */ @Override public HttpServerAuthenticationMechanism createAuthenticationMechanism(String mechanismName, Map<String, ?> properties, CallbackHandler callbackHandler) throws HttpAuthenticationException { return delegate.createAuthenticationMechanism(mechanismName, combine(properties, this.properties), callbackHandler); }
/** * Obtain the list of available mechanism names after merging the properties. * * @param properties the initial set of properties to pass to the delegate to obtain the mechanism names. * @return the list of authentication mechanisms available form this factory. * @see org.wildfly.security.http.HttpServerAuthenticationMechanismFactory#getMechanismNames(java.util.Map) */ @Override public String[] getMechanismNames(Map<String, ?> properties) { return delegate.getMechanismNames(combine(properties, this.properties)); }
/** * Obtain the list of available mechanism names after merging the properties. * * @param properties the initial set of properties to pass to the delegate to obtain the mechanism names. * @return the list of authentication mechanisms available form this factory. * @see org.wildfly.security.http.HttpServerAuthenticationMechanismFactory#getMechanismNames(java.util.Map) */ @Override public String[] getMechanismNames(Map<String, ?> properties) { return delegate.getMechanismNames(combine(properties, this.properties)); }
/** * Obtain the list of available mechanism names after merging the properties. * * @param properties the initial set of properties to pass to the delegate to obtain the mechanism names. * @return the list of authentication mechanisms available form this factory. * @see org.wildfly.security.http.HttpServerAuthenticationMechanismFactory#getMechanismNames(java.util.Map) */ @Override public String[] getMechanismNames(Map<String, ?> properties) { return delegate.getMechanismNames(combine(properties, this.properties)); }
/** * Create an instance of the requested {@link HttpServerAuthenticationMechanismFactory}. * * @param mechanismName the name of the mechanism being requested. * @param properties initial properties to be passed into the delegate factory. * @param callbackHandler the {@link CallbackHandler} to use for verification. * @return The newly created {@link HttpServerAuthenticationMechanismFactory}, or {@code null} if not availbale. * @throws HttpAuthenticationException * @see org.wildfly.security.http.HttpServerAuthenticationMechanismFactory#createAuthenticationMechanism(java.lang.String, * java.util.Map, javax.security.auth.callback.CallbackHandler) */ @Override public HttpServerAuthenticationMechanism createAuthenticationMechanism(String mechanismName, Map<String, ?> properties, CallbackHandler callbackHandler) throws HttpAuthenticationException { return delegate.createAuthenticationMechanism(mechanismName, combine(properties, this.properties), callbackHandler); }
/** * Create an instance of the requested {@link HttpServerAuthenticationMechanismFactory}. * * @param mechanismName the name of the mechanism being requested. * @param properties initial properties to be passed into the delegate factory. * @param callbackHandler the {@link CallbackHandler} to use for verification. * @return The newly created {@link HttpServerAuthenticationMechanismFactory}, or {@code null} if not availbale. * @throws HttpAuthenticationException * @see org.wildfly.security.http.HttpServerAuthenticationMechanismFactory#createAuthenticationMechanism(java.lang.String, * java.util.Map, javax.security.auth.callback.CallbackHandler) */ @Override public HttpServerAuthenticationMechanism createAuthenticationMechanism(String mechanismName, Map<String, ?> properties, CallbackHandler callbackHandler) throws HttpAuthenticationException { return delegate.createAuthenticationMechanism(mechanismName, combine(properties, this.properties), callbackHandler); }
/** * Create an instance of the requested {@link HttpServerAuthenticationMechanismFactory}. * * @param mechanismName the name of the mechanism being requested. * @param properties initial properties to be passed into the delegate factory. * @param callbackHandler the {@link CallbackHandler} to use for verification. * @return The newly created {@link HttpServerAuthenticationMechanismFactory}, or {@code null} if not availbale. * @throws HttpAuthenticationException * @see org.wildfly.security.http.HttpServerAuthenticationMechanismFactory#createAuthenticationMechanism(java.lang.String, * java.util.Map, javax.security.auth.callback.CallbackHandler) */ @Override public HttpServerAuthenticationMechanism createAuthenticationMechanism(String mechanismName, Map<String, ?> properties, CallbackHandler callbackHandler) throws HttpAuthenticationException { return delegate.createAuthenticationMechanism(mechanismName, combine(properties, this.properties), callbackHandler); }