org.springframework.security.oauth2.provider.token
Class TokenEnhancerChain

java.lang.Object
  extended by org.springframework.security.oauth2.provider.token.TokenEnhancerChain
All Implemented Interfaces:
TokenEnhancer

public class TokenEnhancerChain
extends Object
implements TokenEnhancer

A composite token enhancer that loops over its delegate enhancers.

Author:
Dave Syer

Constructor Summary
TokenEnhancerChain()
           
 
Method Summary
 OAuth2AccessToken enhance(OAuth2AccessToken accessToken, OAuth2Authentication authentication)
          Loop over the delegates passing the result into the next member of the chain.
 void setTokenEnhancers(List<TokenEnhancer> delegates)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TokenEnhancerChain

public TokenEnhancerChain()
Method Detail

setTokenEnhancers

public void setTokenEnhancers(List<TokenEnhancer> delegates)
Parameters:
delegates - the delegates to set

enhance

public OAuth2AccessToken enhance(OAuth2AccessToken accessToken,
                                 OAuth2Authentication authentication)
Loop over the delegates passing the result into the next member of the chain.

Specified by:
enhance in interface TokenEnhancer
Parameters:
accessToken - the current access token with its expiration and refresh token
authentication - the current authentication including client and user details
Returns:
a new token enhanced with additional information
See Also:
TokenEnhancer.enhance(org.springframework.security.oauth2.common.OAuth2AccessToken, org.springframework.security.oauth2.provider.OAuth2Authentication)


Copyright © 2012. All Rights Reserved.