Package com.consol.citrus.http.security
Class SecurityHandlerFactory
- java.lang.Object
-
- com.consol.citrus.http.security.SecurityHandlerFactory
-
- All Implemented Interfaces:
com.consol.citrus.common.InitializingPhase,org.springframework.beans.factory.FactoryBean<org.eclipse.jetty.security.SecurityHandler>
public class SecurityHandlerFactory extends Object implements org.springframework.beans.factory.FactoryBean<org.eclipse.jetty.security.SecurityHandler>, com.consol.citrus.common.InitializingPhase
Factory bean constructs a security handler for usage in Jetty servlet container. Security handler holds one to many constraints and a set of users known to a user login service for authentication.- Since:
- 1.3
- Author:
- Christoph Deppisch
-
-
Constructor Summary
Constructors Constructor Description SecurityHandlerFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.eclipse.jetty.security.AuthenticatorgetAuthenticator()Gets the authenticator.Map<String,org.eclipse.jetty.util.security.Constraint>getConstraints()Gets the constraints.org.eclipse.jetty.security.LoginServicegetLoginService()Gets the loginService.org.eclipse.jetty.security.SecurityHandlergetObject()Construct new security handler for basic authentication.Class<?>getObjectType()StringgetRealm()Gets the realm.List<User>getUsers()Gets the users.voidinitialize()booleanisSingleton()voidsetAuthenticator(org.eclipse.jetty.security.Authenticator authenticator)Sets the authenticator.voidsetConstraints(Map<String,org.eclipse.jetty.util.security.Constraint> constraints)Sets the constraints.voidsetLoginService(org.eclipse.jetty.security.LoginService loginService)Sets the loginService.voidsetRealm(String realm)Sets the realm.voidsetUsers(List<User> users)Sets the users.
-
-
-
Method Detail
-
getObject
public org.eclipse.jetty.security.SecurityHandler getObject() throws ExceptionConstruct new security handler for basic authentication.- Specified by:
getObjectin interfaceorg.springframework.beans.factory.FactoryBean<org.eclipse.jetty.security.SecurityHandler>- Throws:
Exception
-
initialize
public void initialize()
- Specified by:
initializein interfacecom.consol.citrus.common.InitializingPhase
-
getObjectType
public Class<?> getObjectType()
- Specified by:
getObjectTypein interfaceorg.springframework.beans.factory.FactoryBean<org.eclipse.jetty.security.SecurityHandler>
-
isSingleton
public boolean isSingleton()
- Specified by:
isSingletonin interfaceorg.springframework.beans.factory.FactoryBean<org.eclipse.jetty.security.SecurityHandler>
-
setUsers
public void setUsers(List<User> users)
Sets the users.- Parameters:
users- the users to set
-
getRealm
public String getRealm()
Gets the realm.- Returns:
- the realm the realm to get.
-
setRealm
public void setRealm(String realm)
Sets the realm.- Parameters:
realm- the realm to set
-
getConstraints
public Map<String,org.eclipse.jetty.util.security.Constraint> getConstraints()
Gets the constraints.- Returns:
- the constraints the constraints to get.
-
setConstraints
public void setConstraints(Map<String,org.eclipse.jetty.util.security.Constraint> constraints)
Sets the constraints.- Parameters:
constraints- the constraints to set
-
getLoginService
public org.eclipse.jetty.security.LoginService getLoginService()
Gets the loginService.- Returns:
- the loginService the loginService to get.
-
setLoginService
public void setLoginService(org.eclipse.jetty.security.LoginService loginService)
Sets the loginService.- Parameters:
loginService- the loginService to set
-
getAuthenticator
public org.eclipse.jetty.security.Authenticator getAuthenticator()
Gets the authenticator.- Returns:
- the authenticator the authenticator to get.
-
setAuthenticator
public void setAuthenticator(org.eclipse.jetty.security.Authenticator authenticator)
Sets the authenticator.- Parameters:
authenticator- the authenticator to set
-
-