Package org.cyclos.services.access
Interface LoginService
-
- All Superinterfaces:
Service
- All Known Subinterfaces:
LoginServiceLocal
- All Known Implementing Classes:
LoginServiceImpl,LoginServiceSecurity
public interface LoginService extends Service
Service used to provide login for users via web services
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcheckSecondaryPassword(String password)Validate the secondary password for the logged userUserAuthVOgetAuthenticatedUser()Returns the currently authenticated userLoginDatagetLoginData(@NotNull String channelName, Long deviceId, PinLocatorVO pinLocator)Returns the data for user login according to the given channel name and based in the current session configuration.PasswordInputDTOgetSecondaryPasswordInput()Returns the input for the secondary password for the logged user.UserLoginResultlogin(LoginDTO params)Creates a session for the currently authenticated user and optionally sets a timeout for it.UserLoginDetailedResultloginUser(@NotNull UserLoginDTO params)Creates a session for a user, indicating a remote address (from the client connection) a channel and optionally a timeout.
Must be called by administrators with permissions to login other users, and is used when there is a system which relays logins to Cyclos.voidlogout()Invalidates the current user session, if the current request was authenticated with a sessionbooleanlogoutUser(@NotNull String token)Removes the session with the given token, returning whether the sessions was actually removedStringreplaceSession()Replaces the current session token with another one.
-
-
-
Method Detail
-
checkSecondaryPassword
void checkSecondaryPassword(String password) throws FrameworkException
Validate the secondary password for the logged user- Throws:
FrameworkException
-
getAuthenticatedUser
UserAuthVO getAuthenticatedUser() throws FrameworkException
Returns the currently authenticated user- Throws:
FrameworkException
-
getLoginData
LoginData getLoginData(@NotNull @NotNull String channelName, Long deviceId, PinLocatorVO pinLocator) throws FrameworkException
Returns the data for user login according to the given channel name and based in the current session configuration.- Parameters:
deviceId- (Optional) A trusted device id can be given to know if it is operative, if so then a pending device confirmation will be created (in a new read-write transaction) and its id returned in the result data. Otherwise no confirmation will be created.pinLocator- (Optional) A device pin locator can be given to know it it is operative- Throws:
FrameworkException
-
getSecondaryPasswordInput
PasswordInputDTO getSecondaryPasswordInput() throws FrameworkException
Returns the input for the secondary password for the logged user.- Throws:
FrameworkException
-
login
UserLoginResult login(LoginDTO params) throws FrameworkException, LoginException, RemoteAddressBlockedException
Creates a session for the currently authenticated user and optionally sets a timeout for it. Also, if an identity provider state id is given, and such state exists, the user that performed the login will be linked to that provider
-
loginUser
UserLoginDetailedResult loginUser(@NotNull @NotNull UserLoginDTO params) throws FrameworkException, LoginException, RemoteAddressBlockedException
Creates a session for a user, indicating a remote address (from the client connection) a channel and optionally a timeout.
Must be called by administrators with permissions to login other users, and is used when there is a system which relays logins to Cyclos.
-
logout
void logout() throws FrameworkExceptionInvalidates the current user session, if the current request was authenticated with a session- Throws:
FrameworkException
-
logoutUser
boolean logoutUser(@NotNull @NotNull String token) throws FrameworkExceptionRemoves the session with the given token, returning whether the sessions was actually removed- Throws:
FrameworkException
-
replaceSession
String replaceSession() throws FrameworkException
Replaces the current session token with another one. Only works if the current authentication is done via a session. The current session will have a new token generated, and that token is returned. If not connected as a session, will return null.- Throws:
FrameworkException
-
-