Package org.cyclos.impl.access
Class InternalAuthServiceImpl
- java.lang.Object
-
- org.cyclos.impl.AbstractServerComponent
-
- org.cyclos.impl.AbstractNetworkedServerComponent
-
- org.cyclos.impl.BaseServiceImpl
-
- org.cyclos.impl.access.InternalAuthServiceImpl
-
- All Implemented Interfaces:
InternalAuthServiceLocal,InternalAuthService,Service
@Service public class InternalAuthServiceImpl extends BaseServiceImpl implements InternalAuthServiceLocal
Local interface forInternalAuthService
-
-
Field Summary
-
Fields inherited from class org.cyclos.impl.AbstractNetworkedServerComponent
authHandler, conversionHandler, customFieldValueHandler, entityManagerHandler, groupsHandler, productsHandler, restBeanPropertyMapping, userLocatorHandler
-
Fields inherited from class org.cyclos.impl.AbstractServerComponent
accountHandler, configurationHandler, dataTranslationHandler, notificationHandler, profileFieldHandler, transactionHandler, translationHandler
-
-
Constructor Summary
Constructors Constructor Description InternalAuthServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AuthVOgetCurrentAuth()Returns the authentication information for the currently authenticated userSessionPropertiesVOgetSessionProperties()Returns the current session properties.AuthVOlogin(InternalLoginDTO loginParams)Creates a session for the currently authenticated user, returning the auth.AuthVOloginUser(UserLoginDTO params)Creates a session for the given user, returning the authprotected voidregisterNetworkMappings(NetworkPathRegistry networkPathRegistry)Needs to be overridden by subclasses to register the path up to the networkvoidsetSessionProperties(@NotNull SetSessionPropertiesDTO properties)Sets the current session properties.-
Methods inherited from class org.cyclos.impl.BaseServiceImpl
initializeNetworkMappings
-
Methods inherited from class org.cyclos.impl.AbstractNetworkedServerComponent
canManage, checkManagesUser, checkPermission, checkRelatesToUser, checkValue, clearAlreadyValidated, getBaseEntityManagerHandler, getConfiguration, getLoggedBasicUser, getLoggedUser, getProducts, getTranslatedName, getTranslatedValue, hasPermission, hasValue, inSameNetwork, inSameNetworkOrGlobal, isAdmin, isAlreadyValidated, isBroker, isGlobalAdmin, isGlobalAdminInNetwork, isGuest, isLoggedIn, isMember, isMemberOnly, isNetworkAdmin, isOperator, isRelatedToUser, isSystem, isUserManager, isUserManagerOf, message, message, permission, permission, permissionOptionalValue, permissionOptionalValue, setAlreadyValidated, toDate, toDateTime, validate
-
Methods inherited from class org.cyclos.impl.AbstractServerComponent
dataTranslationProxy, dataTranslationProxy, delete, detach, doDataTranslationProxy, find, flush, from, getApplicationContext, getFormatter, getFormatter, getFormatter, getLogger, getRemoteAddress, getSessionData, mailContentBuilder, message, message, persist, processBatch, processBatch, refresh, remove, selectFrom, subQuery, update
-
-
-
-
Method Detail
-
getCurrentAuth
public AuthVO getCurrentAuth() throws FrameworkException
Description copied from interface:InternalAuthServiceReturns the authentication information for the currently authenticated user- Specified by:
getCurrentAuthin interfaceInternalAuthService- Throws:
FrameworkException
-
getSessionProperties
public SessionPropertiesVO getSessionProperties() throws FrameworkException
Description copied from interface:InternalAuthServiceReturns the current session properties.- Specified by:
getSessionPropertiesin interfaceInternalAuthService- Returns:
- null if not logged in with a session.
- Throws:
FrameworkException
-
login
public AuthVO login(InternalLoginDTO loginParams) throws FrameworkException, LoginException, RemoteAddressBlockedException
Description copied from interface:InternalAuthServiceCreates a session for the currently authenticated user, returning the auth. If a device confirmation id is given and can be validated correctly then the session will be marked as trusted meaning no confirmation password will be required. Otherwise, the session (silently) won't be marked as trusted and the confirmation password will be required according to the channel configuration.- Specified by:
loginin interfaceInternalAuthService- Parameters:
loginParams- TODO- Throws:
FrameworkExceptionLoginExceptionRemoteAddressBlockedException
-
loginUser
public AuthVO loginUser(UserLoginDTO params) throws FrameworkException, LoginException, RemoteAddressBlockedException
Description copied from interface:InternalAuthServiceCreates a session for the given user, returning the auth- Specified by:
loginUserin interfaceInternalAuthService- Throws:
FrameworkExceptionLoginExceptionRemoteAddressBlockedException
-
setSessionProperties
public void setSessionProperties(@NotNull @NotNull SetSessionPropertiesDTO properties) throws FrameworkExceptionDescription copied from interface:InternalAuthServiceSets the current session properties.- Specified by:
setSessionPropertiesin interfaceInternalAuthService- Throws:
FrameworkException
-
registerNetworkMappings
protected void registerNetworkMappings(NetworkPathRegistry networkPathRegistry)
Description copied from class:BaseServiceImplNeeds to be overridden by subclasses to register the path up to the network- Specified by:
registerNetworkMappingsin classBaseServiceImpl
-
-