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
on successful authentication by the Identity provider.
Created by srujant on 6/8/18.
invalid reference
WMAuthenticationToken
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe defaultURIwhere thisFilterprocesses authentication requests.Fields inherited from class org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter
authenticationDetailsSource, eventPublisher, messages -
Constructor Summary
ConstructorsConstructorDescriptionOpenIdLoginAuthenticationFilter(org.springframework.security.oauth2.client.registration.ClientRegistrationRepository clientRegistrationRepository, org.springframework.security.oauth2.client.OAuth2AuthorizedClientService authorizedClientService) Constructs anOAuth2LoginAuthenticationFilterusing the provided parameters.OpenIdLoginAuthenticationFilter(org.springframework.security.oauth2.client.registration.ClientRegistrationRepository clientRegistrationRepository, org.springframework.security.oauth2.client.OAuth2AuthorizedClientService authorizedClientService, String filterProcessesUrl) Constructs anOAuth2LoginAuthenticationFilterusing the provided parameters. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.core.AuthenticationattemptAuthentication(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) final voidsetAuthorizationRequestRepository(org.springframework.security.oauth2.client.web.AuthorizationRequestRepository<org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest> authorizationRequestRepository) Sets the repository for storedOAuth2AuthorizationRequest'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, unsuccessfulAuthenticationMethods inherited from class org.springframework.web.filter.GenericFilterBean
addRequiredProperty, createEnvironment, destroy, getEnvironment, getFilterConfig, getFilterName, getServletContext, init, initBeanWrapper, initFilterBean, setBeanName, setEnvironment, setServletContext
-
Field Details
-
DEFAULT_FILTER_PROCESSES_URI
The defaultURIwhere thisFilterprocesses 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 anOAuth2LoginAuthenticationFilterusing the provided parameters.- Parameters:
clientRegistrationRepository- the repository of client registrationsauthorizedClientService- 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 anOAuth2LoginAuthenticationFilterusing the provided parameters.- Parameters:
clientRegistrationRepository- the repository of client registrationsauthorizedClientService- the authorized client servicefilterProcessesUrl- theURIwhere thisFilterwill 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:
attemptAuthenticationin classorg.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter- Throws:
org.springframework.security.core.AuthenticationExceptionIOExceptionjakarta.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 storedOAuth2AuthorizationRequest's.- Parameters:
authorizationRequestRepository- the repository for storedOAuth2AuthorizationRequest's
-