org.springframework.security.oauth2.provider.code
Class RandomValueAuthorizationCodeServices
java.lang.Object
org.springframework.security.oauth2.provider.code.RandomValueAuthorizationCodeServices
- All Implemented Interfaces:
- AuthorizationCodeServices
- Direct Known Subclasses:
- InMemoryAuthorizationCodeServices, JdbcAuthorizationCodeServices
public abstract class RandomValueAuthorizationCodeServices
- extends Object
- implements AuthorizationCodeServices
Base implementation for authorization code services that generates a random-value authorization code.
- Author:
- Ryan Heaton, Dave Syer
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RandomValueAuthorizationCodeServices
public RandomValueAuthorizationCodeServices()
store
protected abstract void store(String code,
OAuth2Authentication authentication)
remove
protected abstract OAuth2Authentication remove(String code)
createAuthorizationCode
public String createAuthorizationCode(OAuth2Authentication authentication)
- Description copied from interface:
AuthorizationCodeServices
- Create a authorization code for the specified authentications.
- Specified by:
createAuthorizationCode in interface AuthorizationCodeServices
- Parameters:
authentication - The authentications to store.
- Returns:
- The generated code.
consumeAuthorizationCode
public OAuth2Authentication consumeAuthorizationCode(String code)
throws InvalidGrantException
- Description copied from interface:
AuthorizationCodeServices
- Consume a authorization code.
- Specified by:
consumeAuthorizationCode in interface AuthorizationCodeServices
- Parameters:
code - The authorization code to consume.
- Returns:
- The authentications associated with the code.
- Throws:
InvalidGrantException - If the authorization code is invalid or expired.
Copyright © 2013. All rights reserved.