Interface AuthorizationService
-
- All Known Implementing Classes:
AuthClassicConnectorService
public interface AuthorizationService
Service interface for authorization to specific models.- Author:
- mak
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
autoLogon()
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.User
changePassword(User user, java.lang.String newPassword)
Changes the password of the given user.boolean
closeSession(com.saperion.connector.authentication.Session session)
Close the givenSession
User
getCurrentUser()
java.lang.String
getLastUser()
SystemType
getSystemType()
Get the system type.java.util.List<UserType>
getUserTypes()
Get available user types.ModelConnectionStatus
isConnected()
Check connection status.void
logoff()
Logoff from service.User
logon(AuthenticationInformation auth)
Logon to service.boolean
logoutHandledByLogonProvider()
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(java.lang.String lastUser)
Sets the last user name.void
setLocale(java.util.Locale locale)
Sets the locale for the underlying connection to the backend.
-
-
-
Method Detail
-
logon
User logon(AuthenticationInformation auth) throws AuthenticationException, SystemException
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
boolean autoLogon() throws AuthenticationException, SystemException
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
void logoff() throws AuthenticationException, DocumentLockException, SystemException
Logoff from service.- Throws:
AuthenticationException
- authentication to the backend has failedDocumentLockException
- when a locked document could not be unlockedSystemException
- when logoff has failed
-
getUserTypes
java.util.List<UserType> getUserTypes()
Get available user types.- Returns:
- Usertypes
-
getSystemType
SystemType getSystemType() throws SystemException
Get the system type.- Returns:
- System type
- Throws:
SystemException
- when the system type can not be determined
-
isConnected
ModelConnectionStatus isConnected() throws SystemException
Check connection status.- Returns:
- Connection status
- Throws:
SystemException
- when the connection status can not be determined
-
setLastUser
void setLastUser(java.lang.String lastUser)
Sets the last user name.- Parameters:
lastUser
- last user name
-
getLastUser
java.lang.String getLastUser()
- Returns:
- last user name
-
setCurrentUserPresent
void setCurrentUserPresent(boolean present) throws SystemException, AuthenticationException
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
User getCurrentUser() throws AuthenticationException, SystemException
- 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
User changePassword(User user, java.lang.String newPassword) throws SystemException, AuthenticationException
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
void setLocale(java.util.Locale locale) throws AuthenticationException, SystemException
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
-
-