Class OpenIdLoginAuthenticationFilter

java.lang.Object
org.springframework.web.filter.GenericFilterBean
org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter
com.wavemaker.runtime.security.provider.openid.OpenIdLoginAuthenticationFilter
All Implemented Interfaces:
jakarta.servlet.Filter, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationEventPublisherAware, org.springframework.context.EnvironmentAware, org.springframework.context.MessageSourceAware, org.springframework.core.env.EnvironmentCapable, org.springframework.web.context.ServletContextAware

public class OpenIdLoginAuthenticationFilter extends org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter
This class get's the id_token from the Identity provider using the code sent by the authorization server and returns
invalid reference
WMAuthenticationToken
on successful authentication by the Identity provider. Created by srujant on 6/8/18.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The default URI where this Filter processes authentication requests.

    Fields inherited from class org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter

    authenticationDetailsSource, eventPublisher, messages
  • Constructor Summary

    Constructors
    Constructor
    Description
    OpenIdLoginAuthenticationFilter(org.springframework.security.oauth2.client.registration.ClientRegistrationRepository clientRegistrationRepository, org.springframework.security.oauth2.client.OAuth2AuthorizedClientService authorizedClientService)
    Constructs an OAuth2LoginAuthenticationFilter using the provided parameters.
    OpenIdLoginAuthenticationFilter(org.springframework.security.oauth2.client.registration.ClientRegistrationRepository clientRegistrationRepository, org.springframework.security.oauth2.client.OAuth2AuthorizedClientService authorizedClientService, String filterProcessesUrl)
    Constructs an OAuth2LoginAuthenticationFilter using the provided parameters.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.security.core.Authentication
    attemptAuthentication(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
     
    final void
    setAuthorizationRequestRepository(org.springframework.security.oauth2.client.web.AuthorizationRequestRepository<org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest> authorizationRequestRepository)
    Sets the repository for stored OAuth2AuthorizationRequest's.

    Methods inherited from class org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter

    afterPropertiesSet, doFilter, getAllowSessionCreation, getAuthenticationManager, getFailureHandler, getRememberMeServices, getSuccessHandler, requiresAuthentication, setAllowSessionCreation, setApplicationEventPublisher, setAuthenticationConverter, setAuthenticationDetailsSource, setAuthenticationFailureHandler, setAuthenticationManager, setAuthenticationSuccessHandler, setContinueChainBeforeSuccessfulAuthentication, setFilterProcessesUrl, setMessageSource, setRememberMeServices, setRequiresAuthenticationRequestMatcher, setSecurityContextHolderStrategy, setSecurityContextRepository, setSessionAuthenticationStrategy, successfulAuthentication, unsuccessfulAuthentication

    Methods inherited from class org.springframework.web.filter.GenericFilterBean

    addRequiredProperty, createEnvironment, destroy, getEnvironment, getFilterConfig, getFilterName, getServletContext, init, initBeanWrapper, initFilterBean, setBeanName, setEnvironment, setServletContext

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • DEFAULT_FILTER_PROCESSES_URI

      public static final String DEFAULT_FILTER_PROCESSES_URI
      The default URI where this Filter processes authentication requests.
      See Also:
  • Constructor Details

    • OpenIdLoginAuthenticationFilter

      public OpenIdLoginAuthenticationFilter(org.springframework.security.oauth2.client.registration.ClientRegistrationRepository clientRegistrationRepository, org.springframework.security.oauth2.client.OAuth2AuthorizedClientService authorizedClientService)
      Constructs an OAuth2LoginAuthenticationFilter using the provided parameters.
      Parameters:
      clientRegistrationRepository - the repository of client registrations
      authorizedClientService - the authorized client service
    • OpenIdLoginAuthenticationFilter

      public OpenIdLoginAuthenticationFilter(org.springframework.security.oauth2.client.registration.ClientRegistrationRepository clientRegistrationRepository, org.springframework.security.oauth2.client.OAuth2AuthorizedClientService authorizedClientService, String filterProcessesUrl)
      Constructs an OAuth2LoginAuthenticationFilter using the provided parameters.
      Parameters:
      clientRegistrationRepository - the repository of client registrations
      authorizedClientService - the authorized client service
      filterProcessesUrl - the URI where this Filter will process the authentication requests
  • Method Details

    • attemptAuthentication

      public org.springframework.security.core.Authentication attemptAuthentication(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) throws org.springframework.security.core.AuthenticationException, IOException, jakarta.servlet.ServletException
      Overrides:
      attemptAuthentication in class org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter
      Throws:
      org.springframework.security.core.AuthenticationException
      IOException
      jakarta.servlet.ServletException
    • setAuthorizationRequestRepository

      public final void setAuthorizationRequestRepository(org.springframework.security.oauth2.client.web.AuthorizationRequestRepository<org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest> authorizationRequestRepository)
      Sets the repository for stored OAuth2AuthorizationRequest's.
      Parameters:
      authorizationRequestRepository - the repository for stored OAuth2AuthorizationRequest's