Class AuthenticationController
java.lang.Object
org.craftercms.profile.controllers.rest.AuthenticationController
@Controller
@RequestMapping("/api/1/authentication")
public class AuthenticationController
extends Object
REST controller for the authentication service.
- Author:
- avasquez
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionauthenticate
(String tenantName, String username, String password) createPersistentLogin
(String profileId) createTicket
(String profileId) void
deletePersistentLogin
(String loginId) getPersistentLogin
(String loginId) void
invalidateTicket
(String ticketId) refreshPersistentLoginToken
(String loginId) void
setAuthenticationService
(AuthenticationService authenticationService)
-
Field Details
-
authenticationService
-
-
Constructor Details
-
AuthenticationController
public AuthenticationController()
-
-
Method Details
-
setAuthenticationService
-
authenticate
@RequestMapping(value="/authenticate", method=POST) @ResponseBody public Ticket authenticate(@RequestParam("tenantName") String tenantName, @RequestParam("username") String username, @RequestParam("password") String password) throws ProfileException - Throws:
ProfileException
-
createTicket
@RequestMapping(value="/ticket/create", method=POST) @ResponseBody public Ticket createTicket(@RequestParam("profileId") String profileId) throws ProfileException - Throws:
ProfileException
-
getTicket
@RequestMapping(value="/ticket/{id}", method=GET) @ResponseBody public Ticket getTicket(@PathVariable("id") String ticketId) throws ProfileException - Throws:
ProfileException
-
invalidateTicket
@RequestMapping(value="/ticket/{id}/invalidate", method=POST) @ResponseStatus(OK) public void invalidateTicket(@PathVariable("id") String ticketId) throws ProfileException - Throws:
ProfileException
-
createPersistentLogin
@RequestMapping(value="/persistent_login/create", method=POST) @ResponseBody public PersistentLogin createPersistentLogin(@RequestParam("profileId") String profileId) throws ProfileException - Throws:
ProfileException
-
getPersistentLogin
@RequestMapping(value="/persistent_login/{id}", method=GET) @ResponseBody public PersistentLogin getPersistentLogin(@PathVariable("id") String loginId) throws ProfileException - Throws:
ProfileException
-
refreshPersistentLoginToken
@RequestMapping(value="/persistent_login/{id}/refresh_token", method=POST) @ResponseBody public PersistentLogin refreshPersistentLoginToken(@PathVariable("id") String loginId) throws ProfileException - Throws:
ProfileException
-
deletePersistentLogin
@RequestMapping(value="/persistent_login/{id}/delete", method=POST) @ResponseStatus(OK) public void deletePersistentLogin(@PathVariable("id") String loginId) throws ProfileException - Throws:
ProfileException
-