|
||||||||||
| 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(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(ServletRequest servletRequest,
ServletResponse servletResponse,
FilterChain chain)
|
void |
init(FilterConfig filterConfig)
|
protected void |
redirectUser(UserRedirectRequiredException e,
HttpServletRequest request,
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 InitializingBeanException
public void doFilter(ServletRequest servletRequest,
ServletResponse servletResponse,
FilterChain chain)
throws IOException,
ServletException
doFilter in interface FilterIOException
ServletException
protected void redirectUser(UserRedirectRequiredException e,
HttpServletRequest request,
HttpServletResponse response)
throws IOException
resourceThatNeedsAuthorization - e - The user redirect exception.request - The request.response - The response.
IOException
protected OAuth2ProtectedResourceDetails checkForResourceThatNeedsAuthorization(Exception ex)
throws ServletException,
IOException
ex - The exception.
ServletException
IOException
protected String calculateCurrentUri(HttpServletRequest request)
throws UnsupportedEncodingException
request - The request.
UnsupportedEncodingException
public void init(FilterConfig filterConfig)
throws ServletException
init in interface FilterServletExceptionpublic void destroy()
destroy in interface 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 | |||||||||