org.springframework.security.oauth.examples.sparklr.mvc
Class AdminController

java.lang.Object
  extended by org.springframework.security.oauth.examples.sparklr.mvc.AdminController

@Controller
public class AdminController
extends Object

Controller for resetting the token store for testing purposes.

Author:
Dave Syer

Constructor Summary
AdminController()
           
 
Method Summary
 Collection<OAuth2AccessToken> listTokensForClient(String client)
           
 Collection<OAuth2AccessToken> listTokensForUser(String user, Principal principal)
           
 org.springframework.http.ResponseEntity<Void> revokeToken(String user, String token, Principal principal)
           
 void setTokenServices(ConsumerTokenServices tokenServices)
           
 void setUserApprovalHandler(SparklrUserApprovalHandler userApprovalHandler)
           
 void startCaching()
           
 void stopCaching()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AdminController

public AdminController()
Method Detail

startCaching

@RequestMapping(value="/oauth/cache_approvals")
@ResponseStatus(value=NO_CONTENT)
public void startCaching()
                  throws Exception
Throws:
Exception

stopCaching

@RequestMapping(value="/oauth/uncache_approvals")
@ResponseStatus(value=NO_CONTENT)
public void stopCaching()
                 throws Exception
Throws:
Exception

listTokensForUser

@RequestMapping(value="/oauth/users/{user}/tokens")
@ResponseBody
public Collection<OAuth2AccessToken> listTokensForUser(@PathVariable
                                                                                        String user,
                                                                                        Principal principal)
                                                throws Exception
Throws:
Exception

revokeToken

@RequestMapping(value="/oauth/users/{user}/tokens/{token}",
                method=DELETE)
public org.springframework.http.ResponseEntity<Void> revokeToken(@PathVariable
                                                                                                 String user,
                                                                                                 @PathVariable
                                                                                                 String token,
                                                                                                 Principal principal)
                                                          throws Exception
Throws:
Exception

listTokensForClient

@RequestMapping(value="/oauth/clients/{client}/tokens")
@ResponseBody
public Collection<OAuth2AccessToken> listTokensForClient(@PathVariable
                                                                                          String client)
                                                  throws Exception
Throws:
Exception

setUserApprovalHandler

public void setUserApprovalHandler(SparklrUserApprovalHandler userApprovalHandler)
Parameters:
userApprovalHandler - the userApprovalHandler to set

setTokenServices

public void setTokenServices(ConsumerTokenServices tokenServices)
Parameters:
tokenServices - the consumerTokenServices to set


Copyright © 2012. All Rights Reserved.