public class OAuth2AuthenticationEntryPoint
extends org.springframework.security.web.authentication.LoginUrlAuthenticationEntryPoint
prompt=none
parameter. This implementation will detect the inclusion of the prompt
request param, and if detected to be none, will return an error response consistent with OIDC,
rather than redirect to the login page. This allows for silent authentication flows that are
suitable for SPA use cases.Constructor and Description |
---|
OAuth2AuthenticationEntryPoint(String loginFormUrl,
org.springframework.security.oauth2.provider.ClientDetailsService clientDetailsService,
org.springframework.security.oauth2.provider.endpoint.RedirectResolver redirectResolver,
boolean useRedirectUriHost)
The
useRedirectUriHost flag has been deprecated as the ForwardedHeaderFilter should
be used in all circumstances to correctly determine the redirect URI. |
Modifier and Type | Method and Description |
---|---|
void |
commence(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.security.core.AuthenticationException authException) |
protected String |
determineUrlToUseForThisRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.security.core.AuthenticationException exception) |
org.springframework.security.oauth2.provider.ClientDetailsService |
getClientDetailsService() |
org.springframework.security.oauth2.provider.endpoint.RedirectResolver |
getRedirectResolver() |
org.springframework.security.web.RedirectStrategy |
getRedirectStrategy() |
boolean |
isUseRedirectUriHost() |
void |
setClientDetailsService(org.springframework.security.oauth2.provider.ClientDetailsService clientDetailsService) |
void |
setRedirectResolver(org.springframework.security.oauth2.provider.endpoint.RedirectResolver redirectResolver) |
void |
setRedirectStrategy(org.springframework.security.web.RedirectStrategy redirectStrategy) |
void |
setUseRedirectUriHost(boolean useRedirectUriHost) |
afterPropertiesSet, buildHttpsRedirectUrlForRequest, buildRedirectUrlToLoginPage, getLoginFormUrl, getPortMapper, getPortResolver, isForceHttps, isUseForward, setForceHttps, setPortMapper, setPortResolver, setUseForward
public OAuth2AuthenticationEntryPoint(String loginFormUrl, org.springframework.security.oauth2.provider.ClientDetailsService clientDetailsService, org.springframework.security.oauth2.provider.endpoint.RedirectResolver redirectResolver, @Deprecated boolean useRedirectUriHost)
useRedirectUriHost
flag has been deprecated as the ForwardedHeaderFilter should
be used in all circumstances to correctly determine the redirect URI. When it is used, the
requests will automatically be redirected to the forwarded host/path.public void commence(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.security.core.AuthenticationException authException) throws IOException, javax.servlet.ServletException
commence
in interface org.springframework.security.web.AuthenticationEntryPoint
commence
in class org.springframework.security.web.authentication.LoginUrlAuthenticationEntryPoint
IOException
javax.servlet.ServletException
protected String determineUrlToUseForThisRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.security.core.AuthenticationException exception)
determineUrlToUseForThisRequest
in class org.springframework.security.web.authentication.LoginUrlAuthenticationEntryPoint
public org.springframework.security.oauth2.provider.endpoint.RedirectResolver getRedirectResolver()
public org.springframework.security.oauth2.provider.ClientDetailsService getClientDetailsService()
public org.springframework.security.web.RedirectStrategy getRedirectStrategy()
public boolean isUseRedirectUriHost()
public void setRedirectResolver(org.springframework.security.oauth2.provider.endpoint.RedirectResolver redirectResolver)
public void setClientDetailsService(org.springframework.security.oauth2.provider.ClientDetailsService clientDetailsService)
public void setRedirectStrategy(org.springframework.security.web.RedirectStrategy redirectStrategy)
public void setUseRedirectUriHost(boolean useRedirectUriHost)
Copyright © 2021. All rights reserved.