View Javadoc
1   package org.springframework.security.oauth2.provider.token;
2   
3   import org.springframework.security.core.AuthenticationException;
4   import org.springframework.security.oauth2.common.OAuth2AccessToken;
5   import org.springframework.security.oauth2.common.exceptions.InvalidTokenException;
6   import org.springframework.security.oauth2.provider.OAuth2Authentication;
7   
8   public interface ResourceServerTokenServices {
9   
10  	/**
11  	 * Load the credentials for the specified access token.
12  	 *
13  	 * @param accessToken The access token value.
14  	 * @return The authentication for the access token.
15  	 * @throws AuthenticationException If the access token is expired
16  	 * @throws InvalidTokenException if the token isn't valid
17  	 */
18  	OAuth2Authentication loadAuthentication(String accessToken) throws AuthenticationException, InvalidTokenException;
19  
20  	/**
21  	 * Retrieve the full access token details from just the value.
22  	 * 
23  	 * @param accessToken the token value
24  	 * @return the full access token with client id etc.
25  	 */
26  	OAuth2AccessToken readAccessToken(String accessToken);
27  
28  }