Renamed factory and java doc

This commit is contained in:
Frank Schmager 2018-08-20 13:24:29 -04:00 committed by Sebastien Blanc
parent b21e784826
commit 3e2e0ac91c
3 changed files with 11 additions and 5 deletions

View file

@ -7,7 +7,13 @@ import org.keycloak.adapters.KeycloakDeployment;
import org.keycloak.adapters.RequestAuthenticator; import org.keycloak.adapters.RequestAuthenticator;
import org.keycloak.adapters.spi.HttpFacade; import org.keycloak.adapters.spi.HttpFacade;
/**
* Creates {@link RequestAuthenticator}s.
*/
public interface RequestAuthenticatorFactory { public interface RequestAuthenticatorFactory {
/**
* Creates new {@link RequestAuthenticator} instances on a per-request basis.
*/
RequestAuthenticator createRequestAuthenticator(HttpFacade facade, HttpServletRequest request, RequestAuthenticator createRequestAuthenticator(HttpFacade facade, HttpServletRequest request,
KeycloakDeployment deployment, AdapterTokenStore tokenStore, int sslRedirectPort); KeycloakDeployment deployment, AdapterTokenStore tokenStore, int sslRedirectPort);
} }

View file

@ -7,11 +7,11 @@ import org.keycloak.adapters.KeycloakDeployment;
import org.keycloak.adapters.RequestAuthenticator; import org.keycloak.adapters.RequestAuthenticator;
import org.keycloak.adapters.spi.HttpFacade; import org.keycloak.adapters.spi.HttpFacade;
public class SpringSecurityRequestAuthenticatorFactor implements RequestAuthenticatorFactory { public class SpringSecurityRequestAuthenticatorFactory implements RequestAuthenticatorFactory {
@Override @Override
public RequestAuthenticator createRequestAuthenticator(HttpFacade facade, public RequestAuthenticator createRequestAuthenticator(HttpFacade facade,
HttpServletRequest request, KeycloakDeployment deployment, AdapterTokenStore tokenStore, HttpServletRequest request, KeycloakDeployment deployment, AdapterTokenStore tokenStore, int sslRedirectPort) {
int sslRedirectPort) {
return new SpringSecurityRequestAuthenticator(facade, request, deployment, tokenStore, sslRedirectPort); return new SpringSecurityRequestAuthenticator(facade, request, deployment, tokenStore, sslRedirectPort);
} }
} }

View file

@ -35,7 +35,7 @@ import org.keycloak.adapters.spi.HttpFacade;
import org.keycloak.adapters.springsecurity.KeycloakAuthenticationException; import org.keycloak.adapters.springsecurity.KeycloakAuthenticationException;
import org.keycloak.adapters.springsecurity.authentication.KeycloakAuthenticationFailureHandler; import org.keycloak.adapters.springsecurity.authentication.KeycloakAuthenticationFailureHandler;
import org.keycloak.adapters.springsecurity.authentication.RequestAuthenticatorFactory; import org.keycloak.adapters.springsecurity.authentication.RequestAuthenticatorFactory;
import org.keycloak.adapters.springsecurity.authentication.SpringSecurityRequestAuthenticatorFactor; import org.keycloak.adapters.springsecurity.authentication.SpringSecurityRequestAuthenticatorFactory;
import org.keycloak.adapters.springsecurity.facade.SimpleHttpFacade; import org.keycloak.adapters.springsecurity.facade.SimpleHttpFacade;
import org.keycloak.adapters.springsecurity.token.AdapterTokenStoreFactory; import org.keycloak.adapters.springsecurity.token.AdapterTokenStoreFactory;
import org.keycloak.adapters.springsecurity.token.KeycloakAuthenticationToken; import org.keycloak.adapters.springsecurity.token.KeycloakAuthenticationToken;
@ -84,7 +84,7 @@ public class KeycloakAuthenticationProcessingFilter extends AbstractAuthenticati
private AdapterDeploymentContext adapterDeploymentContext; private AdapterDeploymentContext adapterDeploymentContext;
private AdapterTokenStoreFactory adapterTokenStoreFactory = new SpringSecurityAdapterTokenStoreFactory(); private AdapterTokenStoreFactory adapterTokenStoreFactory = new SpringSecurityAdapterTokenStoreFactory();
private AuthenticationManager authenticationManager; private AuthenticationManager authenticationManager;
private RequestAuthenticatorFactory requestAuthenticatorFactory = new SpringSecurityRequestAuthenticatorFactor(); private RequestAuthenticatorFactory requestAuthenticatorFactory = new SpringSecurityRequestAuthenticatorFactory();
/** /**
* Creates a new Keycloak authentication processing filter with given {@link AuthenticationManager} and the * Creates a new Keycloak authentication processing filter with given {@link AuthenticationManager} and the