org.springframework.security.oauth2.provider.authentication
类 OAuth2AuthenticationManager
java.lang.Object
org.springframework.security.oauth2.provider.authentication.OAuth2AuthenticationManager
- 所有已实现的接口:
- org.springframework.beans.factory.InitializingBean, org.springframework.security.authentication.AuthenticationManager
public class OAuth2AuthenticationManager
- extends Object
- implements org.springframework.security.authentication.AuthenticationManager, org.springframework.beans.factory.InitializingBean
An AuthenticationManager for OAuth2 protected resources.
- 作者:
- Dave Syer
| 从类 java.lang.Object 继承的方法 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OAuth2AuthenticationManager
public OAuth2AuthenticationManager()
setResourceId
public void setResourceId(String resourceId)
setTokenServices
public void setTokenServices(ResourceServerTokenServices tokenServices)
- 参数:
tokenServices - the tokenServices to set
afterPropertiesSet
public void afterPropertiesSet()
- 指定者:
- 接口
org.springframework.beans.factory.InitializingBean 中的 afterPropertiesSet
authenticate
public org.springframework.security.core.Authentication authenticate(org.springframework.security.core.Authentication authentication)
throws org.springframework.security.core.AuthenticationException
- Expects the incoming authentication request to have a principal value that is an access token value (e.g. from an
authorization header) .Loads an authentication from the
ResourceServerTokenServices and checks that the
resource id is contained in the AuthorizationRequest (if one is specified). Also copies authentication
details over from the input to the output (e.g. typically so that the access token value and request details can
be reported later).
- 指定者:
- 接口
org.springframework.security.authentication.AuthenticationManager 中的 authenticate
- 参数:
authentication - an authentication request containing an access token value as the principal
- 返回:
- an
OAuth2Authentication
- 抛出:
org.springframework.security.core.AuthenticationException- 另请参见:
AuthenticationManager.authenticate(org.springframework.security.core.Authentication)
Copyright © 2013. All rights reserved.