public class AuthenticationServiceImpl extends Object implements AuthenticationService
AuthenticationService
.Constructor and Description |
---|
AuthenticationServiceImpl() |
public static final String LOG_KEY_AUTHENTICATION_SUCCESSFUL
public static final String LOG_KEY_TICKET_CREATED
public static final String LOG_KEY_TICKET_REQUESTED
public static final String LOG_KEY_TICKET_INVALIDATED
public static final String LOG_KEY_PERSISTENT_LOGIN_CREATED
public static final String LOG_KEY_PERSISTENT_LOGIN_TOKEN_REFRESHED
public static final String LOG_KEY_PERSISTENT_LOGIN_DELETED
public static final String ERROR_KEY_CREATE_TICKET_ERROR
public static final String ERROR_KEY_GET_TICKET_ERROR
public static final String ERROR_KEY_UPDATE_TICKET_ERROR
public static final String ERROR_KEY_DELETE_TICKET_ERROR
public static final String ERROR_KEY_CREATE_PERSISTENT_LOGIN_ERROR
public static final String ERROR_KEY_GET_PERSISTENT_LOGIN_ERROR
public static final String ERROR_KEY_UPDATE_PERSISTENT_LOGIN_ERROR
public static final String ERROR_KEY_DELETE_PERSISTENT_LOGIN_ERROR
public static final String ERROR_KEY_WAIT_IS_ABORTED
protected org.craftercms.commons.security.permissions.PermissionEvaluator<AccessToken,String> permissionEvaluator
protected TicketRepository ticketRepository
protected PersistentLoginRepository persistentLoginRepository
protected ProfileService profileService
protected int lockTime
protected int failedLoginAttemptsBeforeLock
protected int failedLoginAttemptsBeforeDelay
public void setPermissionEvaluator(org.craftercms.commons.security.permissions.PermissionEvaluator<AccessToken,String> permissionEvaluator)
public void setTicketRepository(TicketRepository ticketRepository)
public void setPersistentLoginRepository(PersistentLoginRepository persistentLoginRepository)
public void setProfileService(ProfileService profileService)
public Ticket authenticate(String tenantName, String username, String password) throws ProfileException
authenticate
in interface AuthenticationService
ProfileException
protected void countAsFail(Profile profile) throws ProfileException
ProfileException
protected boolean isProfileInTimeOut(Profile profile)
public Ticket createTicket(String profileId) throws ProfileException
createTicket
in interface AuthenticationService
ProfileException
public Ticket getTicket(String ticketId) throws ProfileException
getTicket
in interface AuthenticationService
ProfileException
public void invalidateTicket(String ticketId) throws ProfileException
invalidateTicket
in interface AuthenticationService
ProfileException
public PersistentLogin createPersistentLogin(String profileId) throws ProfileException
createPersistentLogin
in interface AuthenticationService
ProfileException
public PersistentLogin getPersistentLogin(String loginId) throws ProfileException
getPersistentLogin
in interface AuthenticationService
ProfileException
public PersistentLogin refreshPersistentLoginToken(String loginId) throws ProfileException
refreshPersistentLoginToken
in interface AuthenticationService
ProfileException
public void deletePersistentLogin(String loginId) throws ProfileException
deletePersistentLogin
in interface AuthenticationService
ProfileException
protected void checkIfManageTicketsIsAllowed(String tenantName)
public void setLockTime(int lockTime)
public void setFailedLoginAttemptsBeforeLock(int failedLoginAttemptsBeforeLock)
public void setFailedLoginAttemptsBeforeDelay(int failedLoginAttemptsBeforeDelay)
Copyright © 2021 CrafterCMS. All rights reserved.