org.springframework.security.oauth2.client.token.grant.implicit
类 ImplicitAccessTokenProvider
java.lang.Object
org.springframework.security.oauth2.client.token.OAuth2AccessTokenSupport
org.springframework.security.oauth2.client.token.grant.implicit.ImplicitAccessTokenProvider
- 所有已实现的接口:
- AccessTokenProvider
public class ImplicitAccessTokenProvider
- extends OAuth2AccessTokenSupport
- implements AccessTokenProvider
Provider for obtaining an oauth2 access token by using implicit grant. Normally the implicit grant is used by script
clients in a browser or device, but it can also be useful for native clients generally, so if those clients were
written in Java this would be a nice convenience. Web application clients are also a possiblity, although the
authorization code grant type is probably more common there, and requires no special customizations on the
authorization server. Callers add any additional form parameters they need to the DefaultAccessTokenRequest
and these will be passed onto the authorization endpoint on the server. The server then has to interpret those
parameters, together with any other information available (e.g. from a cookie), and decide if a user can be
authenticated and if the user has approved the grant of the access token. Only if those two conditions are met should
an access token be available through this provider.
- 作者:
- Dave Syer
| 从类 java.lang.Object 继承的方法 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ImplicitAccessTokenProvider
public ImplicitAccessTokenProvider()
supportsResource
public boolean supportsResource(OAuth2ProtectedResourceDetails resource)
- 从接口
AccessTokenProvider 复制的描述
- Whether this provider supports the specified resource.
- 指定者:
- 接口
AccessTokenProvider 中的 supportsResource
- 参数:
resource - The resource.
- 返回:
- Whether this provider supports the specified resource.
supportsRefresh
public boolean supportsRefresh(OAuth2ProtectedResourceDetails resource)
- 指定者:
- 接口
AccessTokenProvider 中的 supportsRefresh
- 参数:
resource - The resource to check
- 返回:
- true if this provider can refresh an access token
refreshAccessToken
public OAuth2AccessToken refreshAccessToken(OAuth2ProtectedResourceDetails resource,
OAuth2RefreshToken refreshToken,
AccessTokenRequest request)
throws UserRedirectRequiredException
- 指定者:
- 接口
AccessTokenProvider 中的 refreshAccessToken
- 参数:
resource - the resource for which a token refresh is requiredrefreshToken - the refresh token to send
- 返回:
- an access token
- 抛出:
UserRedirectRequiredException
obtainAccessToken
public OAuth2AccessToken obtainAccessToken(OAuth2ProtectedResourceDetails details,
AccessTokenRequest request)
throws UserRedirectRequiredException,
org.springframework.security.access.AccessDeniedException,
OAuth2AccessDeniedException
- 从接口
AccessTokenProvider 复制的描述
- Obtain a new access token for the specified protected resource.
- 指定者:
- 接口
AccessTokenProvider 中的 obtainAccessToken
- 参数:
details - The protected resource for which this provider is to obtain an access token.request - The parameters of the request giving context for the token details if any.
- 返回:
- The access token for the specified protected resource. The return value may NOT be null.
- 抛出:
UserRedirectRequiredException - If the provider requires the current user to be redirected for
authorization.
org.springframework.security.access.AccessDeniedException - If the user denies access to the protected resource.
OAuth2AccessDeniedException
getResponseExtractor
protected org.springframework.web.client.ResponseExtractor<OAuth2AccessToken> getResponseExtractor()
- 覆盖:
- 类
OAuth2AccessTokenSupport 中的 getResponseExtractor
Copyright © 2013. All rights reserved.