public class OIDCAuthenticationFilter extends org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter
Modifier and Type | Class and Description |
---|---|
protected class |
OIDCAuthenticationFilter.TargetLinkURIAuthenticationSuccessHandler
Handle a successful authentication event.
|
Modifier and Type | Field and Description |
---|---|
protected static String |
CODE_VERIFIER_SESSION_VARIABLE |
static String |
FILTER_PROCESSES_URL |
protected static int |
HTTP_SOCKET_TIMEOUT |
protected int |
httpSocketTimeout |
protected static String |
ISSUER_SESSION_VARIABLE |
protected static String |
NONCE_SESSION_VARIABLE |
protected static String |
REDIRECT_URI_SESION_VARIABLE |
protected static String |
STATE_SESSION_VARIABLE |
protected static String |
TARGET_SESSION_VARIABLE |
Constructor and Description |
---|
OIDCAuthenticationFilter()
OpenIdConnectAuthenticationFilter constructor
|
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
org.springframework.security.core.Authentication |
attemptAuthentication(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
protected static String |
createCodeVerifier(javax.servlet.http.HttpSession session)
Create a random code challenge and store it in the session
|
protected static String |
createNonce(javax.servlet.http.HttpSession session)
Create a cryptographically random nonce and store it in the session
|
protected static String |
createState(javax.servlet.http.HttpSession session)
Create a cryptographically random state and store it in the session
|
AuthRequestOptionsService |
getAuthRequestOptionsService() |
AuthRequestUrlBuilder |
getAuthRequestUrlBuilder() |
ClientConfigurationService |
getClientConfigurationService() |
IssuerService |
getIssuerService() |
ServerConfigurationService |
getServerConfigurationService() |
protected static String |
getStoredCodeVerifier(javax.servlet.http.HttpSession session)
Retrieve the stored challenge from our session
|
protected static String |
getStoredNonce(javax.servlet.http.HttpSession session)
Get the nonce we stored in the session
|
protected static String |
getStoredState(javax.servlet.http.HttpSession session)
Get the state we stored in the session
|
SymmetricKeyJWTValidatorCacheService |
getSymmetricCacheService() |
OIDCAuthenticationFilter.TargetLinkURIAuthenticationSuccessHandler |
getTargetLinkURIAuthenticationSuccessHandler() |
int |
getTimeSkewAllowance() |
JWKSetCacheService |
getValidationServices() |
protected org.springframework.security.core.Authentication |
handleAuthorizationCodeResponse(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
protected void |
handleAuthorizationRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Initiate an Authorization request
|
protected void |
handleError(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Handle Authorization Endpoint error
|
void |
setAuthenticationSuccessHandler(org.springframework.security.web.authentication.AuthenticationSuccessHandler successHandler) |
void |
setAuthRequestOptionsService(AuthRequestOptionsService authOptions) |
void |
setAuthRequestUrlBuilder(AuthRequestUrlBuilder authRequestBuilder) |
void |
setClientConfigurationService(ClientConfigurationService clients) |
void |
setIssuerService(IssuerService issuerService) |
void |
setServerConfigurationService(ServerConfigurationService servers) |
void |
setSymmetricCacheService(SymmetricKeyJWTValidatorCacheService symmetricCacheService) |
void |
setTargetLinkURIAuthenticationSuccessHandler(OIDCAuthenticationFilter.TargetLinkURIAuthenticationSuccessHandler targetSuccessHandler) |
void |
setTargetLinkURIChecker(TargetLinkURIChecker deepLinkFilter) |
void |
setTimeSkewAllowance(int timeSkewAllowance) |
void |
setValidationServices(JWKSetCacheService validationServices) |
TargetLinkURIChecker |
targetLinkURIChecker() |
doFilter, getAllowSessionCreation, getAuthenticationManager, getFailureHandler, getRememberMeServices, getSuccessHandler, requiresAuthentication, setAllowSessionCreation, setApplicationEventPublisher, setAuthenticationDetailsSource, setAuthenticationFailureHandler, setAuthenticationManager, setContinueChainBeforeSuccessfulAuthentication, setFilterProcessesUrl, setMessageSource, setRememberMeServices, setRequiresAuthenticationRequestMatcher, setSessionAuthenticationStrategy, successfulAuthentication, unsuccessfulAuthentication
protected static final String REDIRECT_URI_SESION_VARIABLE
protected static final String CODE_VERIFIER_SESSION_VARIABLE
protected static final String STATE_SESSION_VARIABLE
protected static final String NONCE_SESSION_VARIABLE
protected static final String ISSUER_SESSION_VARIABLE
protected static final String TARGET_SESSION_VARIABLE
protected static final int HTTP_SOCKET_TIMEOUT
public static final String FILTER_PROCESSES_URL
protected int httpSocketTimeout
public OIDCAuthenticationFilter()
public void afterPropertiesSet()
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
afterPropertiesSet
in class org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter
public org.springframework.security.core.Authentication attemptAuthentication(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws org.springframework.security.core.AuthenticationException, IOException, javax.servlet.ServletException
attemptAuthentication
in class org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter
org.springframework.security.core.AuthenticationException
IOException
javax.servlet.ServletException
protected void handleAuthorizationRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException
request
- The request from which to extract parameters and perform the
authenticationresponse
- IOException
- If an input or output exception occursprotected org.springframework.security.core.Authentication handleAuthorizationCodeResponse(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
request
- The request from which to extract parameters and perform the
authenticationprotected void handleError(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException
request
- The request from which to extract parameters and handle the
errorresponse
- The response, needed to do a redirect to display the errorIOException
- If an input or output exception occursprotected static String createNonce(javax.servlet.http.HttpSession session)
session
- protected static String getStoredNonce(javax.servlet.http.HttpSession session)
session
- protected static String createState(javax.servlet.http.HttpSession session)
session
- protected static String getStoredState(javax.servlet.http.HttpSession session)
session
- protected static String createCodeVerifier(javax.servlet.http.HttpSession session)
session
- protected static String getStoredCodeVerifier(javax.servlet.http.HttpSession session)
session
- public void setAuthenticationSuccessHandler(org.springframework.security.web.authentication.AuthenticationSuccessHandler successHandler)
setAuthenticationSuccessHandler
in class org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter
public int getTimeSkewAllowance()
public void setTimeSkewAllowance(int timeSkewAllowance)
public JWKSetCacheService getValidationServices()
public void setValidationServices(JWKSetCacheService validationServices)
validationServices
- the validationServices to setpublic ServerConfigurationService getServerConfigurationService()
public void setServerConfigurationService(ServerConfigurationService servers)
servers
- the servers to setpublic ClientConfigurationService getClientConfigurationService()
public void setClientConfigurationService(ClientConfigurationService clients)
clients
- the clients to setpublic IssuerService getIssuerService()
public void setIssuerService(IssuerService issuerService)
issuerService
- the issuerService to setpublic AuthRequestUrlBuilder getAuthRequestUrlBuilder()
public void setAuthRequestUrlBuilder(AuthRequestUrlBuilder authRequestBuilder)
authRequestBuilder
- the authRequestBuilder to setpublic AuthRequestOptionsService getAuthRequestOptionsService()
public void setAuthRequestOptionsService(AuthRequestOptionsService authOptions)
authOptions
- the authOptions to setpublic SymmetricKeyJWTValidatorCacheService getSymmetricCacheService()
public void setSymmetricCacheService(SymmetricKeyJWTValidatorCacheService symmetricCacheService)
public OIDCAuthenticationFilter.TargetLinkURIAuthenticationSuccessHandler getTargetLinkURIAuthenticationSuccessHandler()
public void setTargetLinkURIAuthenticationSuccessHandler(OIDCAuthenticationFilter.TargetLinkURIAuthenticationSuccessHandler targetSuccessHandler)
public TargetLinkURIChecker targetLinkURIChecker()
public void setTargetLinkURIChecker(TargetLinkURIChecker deepLinkFilter)
Copyright © 2018. All rights reserved.