public interface AuthenticationService
Modifier and Type | Method and Description |
---|---|
Ticket |
authenticate(String tenantName,
String username,
String password)
Authenticates the user, and returns a ticket identifying the authentication.
|
PersistentLogin |
createPersistentLogin(String profileId)
Creates a persistent login, use for remember me functionality.
|
Ticket |
createTicket(String profileId)
Create a new ticket for the specified profile.
|
void |
deletePersistentLogin(String loginId)
Deletes the persistent login.
|
PersistentLogin |
getPersistentLogin(String loginId)
Returns the persistent login object for the given ID.
|
Ticket |
getTicket(String ticketId)
Returns the ticket object for the given ticket ID.
|
void |
invalidateTicket(String ticketId)
Invalidates the ticket.
|
PersistentLogin |
refreshPersistentLoginToken(String loginId)
Refreshes the token of the specified persistent login.
|
Ticket authenticate(String tenantName, String username, String password) throws ProfileException
tenantName
- the tenant's nameusername
- the usernamepassword
- the passwordProfileException
Ticket createTicket(String profileId) throws ProfileException
Note: this method should only be used when authentication is done through other means (like when authenticating through Facebook or Twitter) different than profile, or when authenticating through a persistent login
profileId
- the ID of the profileProfileException
Ticket getTicket(String ticketId) throws ProfileException
ticketId
- the ID of the ticketProfileException
void invalidateTicket(String ticketId) throws ProfileException
ticketId
- the ID of the ticket to invalidateProfileException
PersistentLogin createPersistentLogin(String profileId) throws ProfileException
profileId
- the ID of the profileProfileException
PersistentLogin getPersistentLogin(String loginId) throws ProfileException
loginId
- the ID of the loginProfileException
PersistentLogin refreshPersistentLoginToken(String loginId) throws ProfileException
loginId
- the ID of the persistent loginProfileException
void deletePersistentLogin(String loginId) throws ProfileException
loginId
- the ID of the login to invalidateProfileException
Copyright © 2021 CrafterCMS. All rights reserved.