Class SecurityHandlerFactory
java.lang.Object
org.citrusframework.http.security.SecurityHandlerFactory
- All Implemented Interfaces:
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>, 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
-
Field Summary
Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.eclipse.jetty.security.AuthenticatorGets the authenticator.Gets the constraints.org.eclipse.jetty.security.LoginServiceGets the loginService.org.eclipse.jetty.security.SecurityHandlerConstruct new security handler for basic authentication.Class<?>getRealm()Gets the realm.getUsers()Gets the users.voidbooleanvoidsetAuthenticator(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.voidSets the realm.voidSets the users.
-
Constructor Details
-
SecurityHandlerFactory
public SecurityHandlerFactory()
-
-
Method Details
-
getObject
Construct 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 interfaceInitializingPhase
-
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>
-
getUsers
Gets the users.- Returns:
- the users the users to get.
-
setUsers
Sets the users.- Parameters:
users- the users to set
-
getRealm
Gets the realm.- Returns:
- the realm.
-
setRealm
Sets the realm.- Parameters:
realm- the realm to set
-
getConstraints
Gets the constraints.- Returns:
- the constraints.
-
setConstraints
Sets the constraints.- Parameters:
constraints- the constraints to set
-
getLoginService
public org.eclipse.jetty.security.LoginService getLoginService()Gets the loginService.- Returns:
- the loginService.
-
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.
-
setAuthenticator
public void setAuthenticator(org.eclipse.jetty.security.Authenticator authenticator) Sets the authenticator.- Parameters:
authenticator- the authenticator to set
-