org.granite.spring.security
Class SpringSecurity3Service
java.lang.Object
org.granite.messaging.service.security.AbstractSecurityService
org.granite.spring.security.SpringSecurity3Service
- All Implemented Interfaces:
- SecurityService, ApplicationContextAware, ApplicationEventPublisherAware
public class SpringSecurity3Service
- extends AbstractSecurityService
- implements ApplicationContextAware, ApplicationEventPublisherAware
- Author:
- Bouiaw, wdrai
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SpringSecurity3Service
public SpringSecurity3Service()
setApplicationContext
public void setApplicationContext(ApplicationContext applicationContext)
- Specified by:
setApplicationContext in interface ApplicationContextAware
setAuthenticationExtension
public void setAuthenticationExtension(AuthenticationExtension authenticationExtension)
setApplicationEventPublisher
public void setApplicationEventPublisher(ApplicationEventPublisher eventPublisher)
- Specified by:
setApplicationEventPublisher in interface ApplicationEventPublisherAware
setAuthenticationManager
public void setAuthenticationManager(org.springframework.security.authentication.AuthenticationManager authenticationManager)
setAuthenticationTrustResolver
public void setAuthenticationTrustResolver(org.springframework.security.authentication.AuthenticationTrustResolver authenticationTrustResolver)
setAllowAnonymousAccess
public void setAllowAnonymousAccess(boolean allowAnonymousAccess)
setSecurityContextRepository
public void setSecurityContextRepository(org.springframework.security.web.context.SecurityContextRepository securityContextRepository)
setSecurityInterceptor
public void setSecurityInterceptor(AbstractSpringSecurity3Interceptor securityInterceptor)
setSessionAuthenticationStrategy
public void setSessionAuthenticationStrategy(org.springframework.security.web.authentication.session.SessionAuthenticationStrategy sessionAuthenticationStrategy)
setPasswordEncoder
public void setPasswordEncoder(org.springframework.security.authentication.encoding.PasswordEncoder passwordEncoder)
configure
public void configure(Map<String,String> params)
- Specified by:
configure in interface SecurityService
login
public void login(Object credentials,
String charset)
- Specified by:
login in interface SecurityService
handleAuthenticationExceptions
protected void handleAuthenticationExceptions(org.springframework.security.core.AuthenticationException e)
authorize
public Object authorize(AbstractSecurityContext context)
throws Exception
- Specified by:
authorize in interface SecurityService
- Throws:
Exception
acceptsContext
public boolean acceptsContext()
- Description copied from class:
AbstractSecurityService
- A security service can optionally indicate that it's able to authorize requests that are not HTTP requests
(websockets). In this case the method
SecurityService.authorize(AbstractSecurityContext) will be
invoked in a ServletGraniteContext and not in a HttpGraniteContext
- Specified by:
acceptsContext in interface SecurityService- Overrides:
acceptsContext in class AbstractSecurityService
- Returns:
- true is a
HttpGraniteContext is mandated
logout
public void logout()
- Specified by:
logout in interface SecurityService
isUserInRole
protected boolean isUserInRole(org.springframework.security.core.Authentication authentication,
String role)
isAuthenticated
protected boolean isAuthenticated(org.springframework.security.core.Authentication authentication)
userCanAccessService
protected boolean userCanAccessService(AbstractSecurityContext context,
org.springframework.security.core.Authentication authentication)
handleAuthorizationExceptions
protected void handleAuthorizationExceptions(InvocationTargetException e)