public interface OAuthProviderTokenServices
Modifier and Type | Method and Description |
---|---|
void |
authorizeRequestToken(String requestToken,
String verifier,
org.springframework.security.core.Authentication authentication)
Authorize the specified request token with the specified authentication credentials.
|
OAuthAccessProviderToken |
createAccessToken(String requestToken)
Create an OAuth access token given the specified request token.
|
OAuthProviderToken |
createUnauthorizedRequestToken(String consumerKey,
String callbackUrl)
Create an unauthorized OAuth request token.
|
OAuthProviderToken |
getToken(String token)
Read a token by its value.
|
OAuthProviderToken getToken(String token) throws org.springframework.security.core.AuthenticationException
token
- The token value.org.springframework.security.core.AuthenticationException
- If the token is invalid, expired, or disabled.OAuthProviderToken createUnauthorizedRequestToken(String consumerKey, String callbackUrl) throws org.springframework.security.core.AuthenticationException
consumerKey
- The consumer key for which to create the token.callbackUrl
- The callback URL associated with the consumer key.org.springframework.security.core.AuthenticationException
- If the consumer isn't valid or otherwise isn't allowed to create a new request token.void authorizeRequestToken(String requestToken, String verifier, org.springframework.security.core.Authentication authentication) throws org.springframework.security.core.AuthenticationException
requestToken
- The request token.verifier
- The verifier to be assigned to the request token.authentication
- The authentication credentials with which to authorize the request token. This is the
authentication of the user who has signed in and is authorizing the consumer to have access to a
protected resource. This same authentication can be pulled from the security context, but it's passed explicitly
here to suggest to the method implementation that it needs to take into account what authorities are being
granted to the consumer by the user.org.springframework.security.core.AuthenticationException
- If the token is expired or otherwise unauthorizable, or if the
authentication credentials are insufficient.OAuthAccessProviderToken createAccessToken(String requestToken) throws org.springframework.security.core.AuthenticationException
requestToken
- The (presumably authorized) request token used to create the access token.org.springframework.security.core.AuthenticationException
- If the request token is expired or disabled or doesn't reference the necessary authentication
credentials or otherwise isn't authorized.Copyright © 2019. All rights reserved.