Interface AuthorizationService
- All Known Implementing Classes:
AuthClassicConnectorService
public interface AuthorizationService
Service interface for authorization to specific models.
- Author:
- mak
-
Method Summary
Modifier and TypeMethodDescriptionboolean
This function tries to automatic logon with SSO or NTLM.boolean
autoLogon
(com.saperion.connector.authentication.SessionInfo sessionInfo) This function tries to automatic logon with SSO or NTLM, passing the web session information.changePassword
(User user, String newPassword) Changes the password of the given user.boolean
closeSession
(com.saperion.connector.authentication.Session session) Close the givenSession
Get the system type.Get available user types.Check connection status.void
logoff()
Logoff from service.Logon to service.boolean
This method checks if aLogonProvider
is responsible of handling actions to be done after the user was logged out.void
setCurrentUserPresent
(boolean present) Sets whether the current user is present.void
setCurrentUserSubstituteAccessEnabled
(boolean accessEnabled) Sets whether the current user's substitute has access to the users workflow-inbox.void
setLastUser
(String lastUser) Sets the last user name.void
Sets the locale for the underlying connection to the backend.
-
Method Details
-
logon
Logon to service.- Parameters:
auth
- authentication information- Returns:
- the currently logged on user
- Throws:
AuthenticationException
- when authentication to the backend has failedSystemException
- system exception when logging on
-
autoLogon
This function tries to automatic logon with SSO or NTLM.- Returns:
- true, if automatic logon could be used, false, if no automatic data is set!
- Throws:
AuthenticationException
- when authentication to the backend has failedSystemException
- system exception when logging on
-
autoLogon
boolean autoLogon(com.saperion.connector.authentication.SessionInfo sessionInfo) throws AuthenticationException, SystemException This function tries to automatic logon with SSO or NTLM, passing the web session information.- Parameters:
sessionInfo
- The web session information- Returns:
- true, if automatic logon could be used, false, if no automatic data is set!
- Throws:
AuthenticationException
- when authentication to the backend has failedSystemException
- system exception when logging on
-
logoutHandledByLogonProvider
boolean logoutHandledByLogonProvider()This method checks if aLogonProvider
is responsible of handling actions to be done after the user was logged out. If a responsible provider is found, it's logout method will be called and this method will return true.- Returns:
- true if logout was handled by a LogonProvier
-
logoff
Logoff from service.- Throws:
AuthenticationException
- authentication to the backend has failedDocumentLockException
- when a locked document could not be unlockedSystemException
- when logoff has failed
-
getUserTypes
Get available user types.- Returns:
- Usertypes
-
getSystemType
Get the system type.- Returns:
- System type
- Throws:
SystemException
- when the system type can not be determined
-
isConnected
Check connection status.- Returns:
- Connection status
- Throws:
SystemException
- when the connection status can not be determined
-
setLastUser
Sets the last user name.- Parameters:
lastUser
- last user name
-
getLastUser
String getLastUser()- Returns:
- last user name
-
setCurrentUserPresent
Sets whether the current user is present.- Parameters:
present
- whether the current user is present- Throws:
SystemException
- when a system exception while setting presence occursAuthenticationException
- when authentication to the backend has failed
-
setCurrentUserSubstituteAccessEnabled
void setCurrentUserSubstituteAccessEnabled(boolean accessEnabled) throws SystemException, AuthenticationException Sets whether the current user's substitute has access to the users workflow-inbox.- Parameters:
accessEnabled
- whether the substitute has access- Throws:
SystemException
- when a system exception while setting presence occursAuthenticationException
- when authentication to the backend has failed
-
getCurrentUser
- Returns:
- Information about the currently logged in User. The instance obtained will not contain information about the authorization (getAuthenticationInformation() will return null).
- Throws:
AuthenticationException
- when authentication to the backend has failedSystemException
- when a system exception while obtaining the information occurs
-
changePassword
Changes the password of the given user. The authentication information of the user needs to be given. This means that the password of the user has to be known.- Parameters:
user
- The user to change the password for. If the authentication information is not given, the call will fail, since the current password is needed to succeed.newPassword
- The new password for the user- Returns:
- updated user information
- Throws:
AuthenticationException
- when authentication to the backend has failedSystemException
- when a system exception while obtaining the information occurs
-
setLocale
Sets the locale for the underlying connection to the backend. Does not change the locale of the client!- Parameters:
locale
- locale to set- Throws:
AuthenticationException
- authentication exception when setting localeSystemException
- system exception when setting locale
-
closeSession
boolean closeSession(com.saperion.connector.authentication.Session session) throws AuthenticationException, SystemException Close the givenSession
- Parameters:
session
-- Returns:
- true if successful, false otherwise
- Throws:
AuthenticationException
SystemException
-