Class ConnectPrincipalServiceImpl
java.lang.Object
ch.tocco.nice2.optional.sso.impl.actions.ConnectPrincipalServiceImpl
- All Implemented Interfaces:
ConnectPrincipalService
@Component
public class ConnectPrincipalServiceImpl
extends Object
implements ConnectPrincipalService
-
Constructor Summary
ConstructorsConstructorDescriptionConnectPrincipalServiceImpl(Context context, PrincipalManager principalManager, QueryBuilderFactory queryBuilderFactory, SecurityManager securityManager, BusinessUnitManager businessUnitManager) -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckAccessRights(Entity principal) The action may only be run as usermanager or for the own principal (username of the selected principal = current username) If the action is called for a different username without usermanager role anUnauthorizedExceptionis thrown.voidconnectPrincipal(Entity principal, String provider, String ssoSubject) writes sso_subject and provider to the selected principalvoiddisconnectPrincipal(Entity principal) remove sso_subject and provider from the selected principalbooleanisAlreadyUsed(String provider, String ssoSubject) sso_subject / provider combinations must be unique, this method may be used to check whether the given combination is already used or not.booleanisConnected(Entity principal) checks if a principal is already connected with a provider
-
Constructor Details
-
ConnectPrincipalServiceImpl
public ConnectPrincipalServiceImpl(Context context, PrincipalManager principalManager, QueryBuilderFactory queryBuilderFactory, SecurityManager securityManager, BusinessUnitManager businessUnitManager)
-
-
Method Details
-
checkAccessRights
Description copied from interface:ConnectPrincipalServiceThe action may only be run as usermanager or for the own principal (username of the selected principal = current username) If the action is called for a different username without usermanager role anUnauthorizedExceptionis thrown.- Specified by:
checkAccessRightsin interfaceConnectPrincipalService
-
isAlreadyUsed
Description copied from interface:ConnectPrincipalServicesso_subject / provider combinations must be unique, this method may be used to check whether the given combination is already used or not.- Specified by:
isAlreadyUsedin interfaceConnectPrincipalService
-
connectPrincipal
Description copied from interface:ConnectPrincipalServicewrites sso_subject and provider to the selected principal- Specified by:
connectPrincipalin interfaceConnectPrincipalService
-
isConnected
Description copied from interface:ConnectPrincipalServicechecks if a principal is already connected with a provider- Specified by:
isConnectedin interfaceConnectPrincipalService
-
disconnectPrincipal
Description copied from interface:ConnectPrincipalServiceremove sso_subject and provider from the selected principal- Specified by:
disconnectPrincipalin interfaceConnectPrincipalService
-