org.springframework.security.oauth2.client.filter
类 OAuth2ClientContextFilter
java.lang.Object
org.springframework.security.oauth2.client.filter.OAuth2ClientContextFilter
- 所有已实现的接口:
- javax.servlet.Filter, org.springframework.beans.factory.InitializingBean
public class OAuth2ClientContextFilter
- extends Object
- implements javax.servlet.Filter, org.springframework.beans.factory.InitializingBean
Security filter for an OAuth2 client.
- 作者:
- Ryan Heaton, Dave Syer
|
字段摘要 |
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. |
|
方法摘要 |
void |
afterPropertiesSet()
|
protected String |
calculateCurrentUri(javax.servlet.http.HttpServletRequest request)
Calculate the current URI given the request. |
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 |
setRedirectStrategy(org.springframework.security.web.RedirectStrategy redirectStrategy)
|
void |
setThrowableAnalyzer(org.springframework.security.web.util.ThrowableAnalyzer throwableAnalyzer)
|
| 从类 java.lang.Object 继承的方法 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CURRENT_URI
public static final 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.
- 另请参见:
- 常量字段值
OAuth2ClientContextFilter
public OAuth2ClientContextFilter()
afterPropertiesSet
public void afterPropertiesSet()
throws Exception
- 指定者:
- 接口
org.springframework.beans.factory.InitializingBean 中的 afterPropertiesSet
- 抛出:
Exception
doFilter
public void doFilter(javax.servlet.ServletRequest servletRequest,
javax.servlet.ServletResponse servletResponse,
javax.servlet.FilterChain chain)
throws IOException,
javax.servlet.ServletException
- 指定者:
- 接口
javax.servlet.Filter 中的 doFilter
- 抛出:
IOException
javax.servlet.ServletException
redirectUser
protected void redirectUser(UserRedirectRequiredException e,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws IOException
- Redirect the user according to the specified exception.
- 参数:
resourceThatNeedsAuthorization - e - The user redirect exception.request - The request.response - The response.
- 抛出:
IOException
calculateCurrentUri
protected String calculateCurrentUri(javax.servlet.http.HttpServletRequest request)
throws UnsupportedEncodingException
- Calculate the current URI given the request.
- 参数:
request - The request.
- 返回:
- The current uri.
- 抛出:
UnsupportedEncodingException
init
public void init(javax.servlet.FilterConfig filterConfig)
throws javax.servlet.ServletException
- 指定者:
- 接口
javax.servlet.Filter 中的 init
- 抛出:
javax.servlet.ServletException
destroy
public void destroy()
- 指定者:
- 接口
javax.servlet.Filter 中的 destroy
setThrowableAnalyzer
public void setThrowableAnalyzer(org.springframework.security.web.util.ThrowableAnalyzer throwableAnalyzer)
setRedirectStrategy
public void setRedirectStrategy(org.springframework.security.web.RedirectStrategy redirectStrategy)
Copyright © 2013. All rights reserved.