Class AccessTokenController
- java.lang.Object
-
- org.craftercms.profile.controllers.rest.AccessTokenController
-
@Controller @RequestMapping("/api/1/access_token") public class AccessTokenController extends Object
REST controller for the access token service.- Author:
- avasquez
-
-
Field Summary
Fields Modifier and Type Field Description protected AccessTokenService
accessTokenService
-
Constructor Summary
Constructors Constructor Description AccessTokenController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AccessToken
createToken(AccessToken token)
void
deleteToken(String id)
List<AccessToken>
getAllTokens()
AccessToken
getToken(String id)
void
setAccessTokenService(AccessTokenService accessTokenService)
-
-
-
Field Detail
-
accessTokenService
protected AccessTokenService accessTokenService
-
-
Method Detail
-
setAccessTokenService
public void setAccessTokenService(AccessTokenService accessTokenService)
-
createToken
@RequestMapping(value="/create", method=POST) @ResponseBody public AccessToken createToken(@RequestBody AccessToken token) throws ProfileException
- Throws:
ProfileException
-
getToken
@RequestMapping(value="/{id}", method=GET) @ResponseBody public AccessToken getToken(@PathVariable("id") String id) throws ProfileException
- Throws:
ProfileException
-
getAllTokens
@RequestMapping(value="/all", method=GET) @ResponseBody public List<AccessToken> getAllTokens() throws ProfileException
- Throws:
ProfileException
-
deleteToken
@RequestMapping(value="/{id}/delete", method=POST) @ResponseStatus(OK) public void deleteToken(@PathVariable("id") String id) throws ProfileException
- Throws:
ProfileException
-
-