Skip to content

Commit

Permalink
[TODO] Make use of the SetRequestInformationMechanismFactory to set t…
Browse files Browse the repository at this point in the history
…he request information during HTTP authentication
  • Loading branch information
Skyllarr committed Nov 20, 2023
1 parent 2178f92 commit f9cf847
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
import org.wildfly.security.http.util.SecurityProviderServerMechanismFactory;
import org.wildfly.security.http.util.ServiceLoaderServerMechanismFactory;
import org.wildfly.security.http.util.SetMechanismInformationMechanismFactory;
import org.wildfly.security.http.util.SetRequestInformationMechanismFactory;
import org.wildfly.security.http.util.SocketAddressCallbackServerMechanismFactory;

/**
Expand Down Expand Up @@ -150,6 +151,7 @@ protected ValueSupplier<HttpServerAuthenticationMechanismFactory> getValueSuppli
final Map<String, String> propertiesMap = PROPERTIES.unwrap(context, model);
return () -> {
HttpServerAuthenticationMechanismFactory factory = factoryInjector.getValue();
factory = new SetRequestInformationMechanismFactory(factory);
factory = new SocketAddressCallbackServerMechanismFactory(factory);
factory = new SetMechanismInformationMechanismFactory(factory);
factory = finalFilter != null ? new FilterServerMechanismFactory(factory, finalFilter) : factory;
Expand Down Expand Up @@ -192,7 +194,7 @@ protected ValueSupplier<HttpServerAuthenticationMechanismFactory> getValueSuppli
if ( findProviderService(actualProviders, serviceFilter) == null ) {
throw ROOT_LOGGER.noSuitableProvider(HttpServerAuthenticationMechanismFactory.class.getSimpleName());
}
return new SocketAddressCallbackServerMechanismFactory(new SetMechanismInformationMechanismFactory(new SecurityProviderServerMechanismFactory(actualProviders)));
return new SetRequestInformationMechanismFactory(new SocketAddressCallbackServerMechanismFactory(new SetMechanismInformationMechanismFactory(new SecurityProviderServerMechanismFactory(actualProviders))));
};
}

Expand All @@ -216,7 +218,7 @@ protected ValueSupplier<HttpServerAuthenticationMechanismFactory> getValueSuppli
try {
ClassLoader classLoader = doPrivileged((PrivilegedExceptionAction<ClassLoader>) () -> resolveClassLoader(module));

return new SocketAddressCallbackServerMechanismFactory(new SetMechanismInformationMechanismFactory(new ServiceLoaderServerMechanismFactory(classLoader)));
return new SetRequestInformationMechanismFactory(new SocketAddressCallbackServerMechanismFactory(new SetMechanismInformationMechanismFactory(new ServiceLoaderServerMechanismFactory(classLoader))));
} catch (Exception e) {
throw new StartException(e);
}
Expand Down

0 comments on commit f9cf847

Please sign in to comment.