Groovy Documentation

com.odobo.grails.plugin.springsecurity.rest
[Groovy] Class RestAuthenticationFilter

java.lang.Object
  org.springframework.web.filter.GenericFilterBean
      com.odobo.grails.plugin.springsecurity.rest.RestAuthenticationFilter

@groovy.util.logging.Log4j
class RestAuthenticationFilter
extends org.springframework.web.filter.GenericFilterBean

This filter starts the initial authentication flow. It uses the configured org.springframework.security.authentication.AuthenticationManager bean, allowing to use any authentication provider defined by other plugins or by the application. If the authentication manager authenticates the request, a token is generated using a TokenGenerator and stored via TokenStorageService. Finally, a org.springframework.security.web.authentication.AuthenticationSuccessHandler is used to render the REST response to the client. If there is an authentication failure, the configured org.springframework.security.web.authentication.AuthenticationFailureHandler will render the response.


Property Summary
org.springframework.security.authentication.AuthenticationDetailsSource authenticationDetailsSource

org.springframework.security.web.authentication.AuthenticationFailureHandler authenticationFailureHandler

org.springframework.security.authentication.AuthenticationManager authenticationManager

org.springframework.security.web.authentication.AuthenticationSuccessHandler authenticationSuccessHandler

CredentialsExtractor credentialsExtractor

java.lang.String endpointUrl

TokenGenerator tokenGenerator

TokenStorageService tokenStorageService

 
Constructor Summary
RestAuthenticationFilter()

 
Method Summary
void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain)

 
Methods inherited from class org.springframework.web.filter.GenericFilterBean
org.springframework.web.filter.GenericFilterBean#init(javax.servlet.FilterConfig), org.springframework.web.filter.GenericFilterBean#destroy(), org.springframework.web.filter.GenericFilterBean#setEnvironment(org.springframework.core.env.Environment), org.springframework.web.filter.GenericFilterBean#setBeanName(java.lang.String), org.springframework.web.filter.GenericFilterBean#afterPropertiesSet(), org.springframework.web.filter.GenericFilterBean#getFilterConfig(), org.springframework.web.filter.GenericFilterBean#setServletContext(javax.servlet.ServletContext), org.springframework.web.filter.GenericFilterBean#wait(long, int), org.springframework.web.filter.GenericFilterBean#wait(long), org.springframework.web.filter.GenericFilterBean#wait(), org.springframework.web.filter.GenericFilterBean#equals(java.lang.Object), org.springframework.web.filter.GenericFilterBean#toString(), org.springframework.web.filter.GenericFilterBean#hashCode(), org.springframework.web.filter.GenericFilterBean#getClass(), org.springframework.web.filter.GenericFilterBean#notify(), org.springframework.web.filter.GenericFilterBean#notifyAll(), org.springframework.web.filter.GenericFilterBean#doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)
 
Methods inherited from class java.lang.Object
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Property Detail

authenticationDetailsSource

org.springframework.security.authentication.AuthenticationDetailsSource authenticationDetailsSource


authenticationFailureHandler

org.springframework.security.web.authentication.AuthenticationFailureHandler authenticationFailureHandler


authenticationManager

org.springframework.security.authentication.AuthenticationManager authenticationManager


authenticationSuccessHandler

org.springframework.security.web.authentication.AuthenticationSuccessHandler authenticationSuccessHandler


credentialsExtractor

CredentialsExtractor credentialsExtractor


endpointUrl

java.lang.String endpointUrl


tokenGenerator

TokenGenerator tokenGenerator


tokenStorageService

TokenStorageService tokenStorageService


 
Constructor Detail

RestAuthenticationFilter

RestAuthenticationFilter()


 
Method Detail

doFilter

@java.lang.Override
void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain)


 

Groovy Documentation