|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.security.oauth2.client.filter.OAuth2ClientContextFilter
public class OAuth2ClientContextFilter
Security filter for an OAuth2 client.
| Field Summary | |
|---|---|
static String |
CURRENT_URI
Key in request attributes for the current URI in case it is needed by rest client code that needs to send a redirect URI to an authorization server. |
| Constructor Summary | |
|---|---|
OAuth2ClientContextFilter()
|
|
| Method Summary | |
|---|---|
void |
afterPropertiesSet()
|
protected String |
calculateCurrentUri(javax.servlet.http.HttpServletRequest request)
Calculate the current URI given the request. |
protected OAuth2ProtectedResourceDetails |
checkForResourceThatNeedsAuthorization(Exception ex)
Check the given exception for the resource that needs authorization. |
void |
destroy()
|
void |
doFilter(javax.servlet.ServletRequest servletRequest,
javax.servlet.ServletResponse servletResponse,
javax.servlet.FilterChain chain)
|
void |
init(javax.servlet.FilterConfig filterConfig)
|
protected void |
redirectUser(UserRedirectRequiredException e,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Redirect the user according to the specified exception. |
void |
setPortResolver(org.springframework.security.web.PortResolver portResolver)
|
void |
setRedirectStrategy(org.springframework.security.web.RedirectStrategy redirectStrategy)
|
void |
setThrowableAnalyzer(org.springframework.security.web.util.ThrowableAnalyzer throwableAnalyzer)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String CURRENT_URI
| Constructor Detail |
|---|
public OAuth2ClientContextFilter()
| Method Detail |
|---|
public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanException
public void doFilter(javax.servlet.ServletRequest servletRequest,
javax.servlet.ServletResponse servletResponse,
javax.servlet.FilterChain chain)
throws IOException,
javax.servlet.ServletException
doFilter in interface javax.servlet.FilterIOException
javax.servlet.ServletException
protected void redirectUser(UserRedirectRequiredException e,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws IOException
resourceThatNeedsAuthorization - e - The user redirect exception.request - The request.response - The response.
IOException
protected OAuth2ProtectedResourceDetails checkForResourceThatNeedsAuthorization(Exception ex)
throws javax.servlet.ServletException,
IOException
ex - The exception.
javax.servlet.ServletException
IOException
protected String calculateCurrentUri(javax.servlet.http.HttpServletRequest request)
throws UnsupportedEncodingException
request - The request.
UnsupportedEncodingException
public void init(javax.servlet.FilterConfig filterConfig)
throws javax.servlet.ServletException
init in interface javax.servlet.Filterjavax.servlet.ServletExceptionpublic void destroy()
destroy in interface javax.servlet.Filterpublic void setThrowableAnalyzer(org.springframework.security.web.util.ThrowableAnalyzer throwableAnalyzer)
public void setPortResolver(org.springframework.security.web.PortResolver portResolver)
public void setRedirectStrategy(org.springframework.security.web.RedirectStrategy redirectStrategy)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||