@Controller @RequestMapping(value="/api/1/authentication") public class AuthenticationController extends Object
Modifier and Type | Field and Description |
---|---|
protected AuthenticationService |
authenticationService |
Constructor and Description |
---|
AuthenticationController() |
Modifier and Type | Method and Description |
---|---|
Ticket |
authenticate(String tenantName,
String username,
String password) |
PersistentLogin |
createPersistentLogin(String profileId) |
Ticket |
createTicket(String profileId) |
void |
deletePersistentLogin(String loginId) |
PersistentLogin |
getPersistentLogin(String loginId) |
Ticket |
getTicket(String ticketId) |
void |
invalidateTicket(String ticketId) |
PersistentLogin |
refreshPersistentLoginToken(String loginId) |
void |
setAuthenticationService(AuthenticationService authenticationService) |
protected AuthenticationService authenticationService
public void setAuthenticationService(AuthenticationService authenticationService)
@RequestMapping(value="/authenticate", method=POST) @ResponseBody public Ticket authenticate(@RequestParam(value="tenantName") String tenantName, @RequestParam(value="username") String username, @RequestParam(value="password") String password) throws ProfileException
ProfileException
@RequestMapping(value="/ticket/create", method=POST) @ResponseBody public Ticket createTicket(@RequestParam(value="profileId") String profileId) throws ProfileException
ProfileException
@RequestMapping(value="/ticket/{id}", method=GET) @ResponseBody public Ticket getTicket(@PathVariable(value="id") String ticketId) throws ProfileException
ProfileException
@RequestMapping(value="/ticket/{id}/invalidate", method=POST) @ResponseStatus(value=OK) public void invalidateTicket(@PathVariable(value="id") String ticketId) throws ProfileException
ProfileException
@RequestMapping(value="/persistent_login/create", method=POST) @ResponseBody public PersistentLogin createPersistentLogin(@RequestParam(value="profileId") String profileId) throws ProfileException
ProfileException
@RequestMapping(value="/persistent_login/{id}", method=GET) @ResponseBody public PersistentLogin getPersistentLogin(@PathVariable(value="id") String loginId) throws ProfileException
ProfileException
@RequestMapping(value="/persistent_login/{id}/refresh_token", method=POST) @ResponseBody public PersistentLogin refreshPersistentLoginToken(@PathVariable(value="id") String loginId) throws ProfileException
ProfileException
@RequestMapping(value="/persistent_login/{id}/delete", method=POST) @ResponseStatus(value=OK) public void deletePersistentLogin(@PathVariable(value="id") String loginId) throws ProfileException
ProfileException
Copyright © 2023 CrafterCMS. All rights reserved.