Interface IDirSystemBizPolicy
- All Superinterfaces:
IBizPolicy
,IComponent
,IDirConstants
,IInitializable
,ISystemHandler
Provides system level biz policies (commands) for the directory system
-
Field Summary
Fields inherited from interface com.webmethods.portal.service.dir.IDirConstants
ADMIN_ROLE_ALIAS, ADMIN_USER_ALIAS, ADMINISTRATOR, ATTR_DISABLED, ATTR_DN, ATTR_EMAIL, ATTR_NAME, ATTR_PASSWORD, CATEGORY_DIRECTORY, CHANGE_PASS, CHANGE_PASS_SUCCESS_ATTR, CONFIRM_PASSWORD_PARAM, DELETED_THINGS_USER, DIR_SVC_CONTAINER, DIR_SVC_TYPE_CONTAINER, DIRECTORY_ROOT, DISPLAY_URI_SEGMENT, DOMAIN_PREFIX_SEPARATOR, EVERYONE_GROUP_ALIAS, FIRST_NAME, FULL_NAME, GROUP_DN_SEGMENT, GROUP_NAME, GUEST_USER_ALIAS, IS_SYSADMIN_ATTR, LAST_NAME, NEW_PASSWORD_PARAM, PAP_GROUP_TYPE_CONTAINER, PAP_PORTAL_ATTRIBUTES, PAP_ROLE_TYPE_CONTAINER, PAP_USER_TYPE_CONTAINER, PROPERTY_PASSWORDVALIDUNTIL, ROLE_CURRENT_ROLES, ROLE_DN_PREFIX, ROLE_DN_SEGMENT, ROLE_PROVIDER_CONTAINER, ROLE_RELATION, ROLE_STORAGE_CONTAINER, SECURITY_SVC_CONTAINER, SKIP_CHECK_AUTH_ATTR, SYSADMIN, SYSTEM_DIRECTORY_SERVICE_ALIAS, TOTP_ADMIN_ALIAS, TOTP_AUTH, TOTP_CATEGORY, TOTP_CREDENTIALS, TOTP_PREFIX, TOTP_SERVICE_TOKEN, TOTP_TOKEN_NAME, TYPE_GROUP, TYPE_NAME_DIRECTORY_ROOT, TYPE_NAME_GROUP, TYPE_NAME_PRINCIPAL, TYPE_NAME_ROLE, TYPE_NAME_SERVICE, TYPE_NAME_USER, TYPE_ROLE, TYPE_USER, USER_DN_SEGMENT, USER_UUID
-
Method Summary
Modifier and TypeMethodDescriptionauthenticateUser
(IContext context, String userid, String password) Attempts to authenticate the user based on the credentials with any registered directory service in their configured search order.authenticateUser
(IContext context, String userid, String password, boolean impersonate) Attempts to authenticate the user based on the credentials with any registered directory service in their configured search order.default IDirUser
authenticateUser
(IContext context, String userID, String password, String oneTimePassword) Attempts to authenticate the user based on the credentials with any registered directory service in their configured search order.default IDirUser
authenticateUser
(IContext context, String userID, String password, String oneTimePassword, boolean impersonate) Attempts to authenticate the user based on the credentials with any registered directory service in their configured search order.listDirectoryServices
(IContext context) Retrieves the list ofIThing
s which are portlets which implement theIDirService
interface and are currently configured.listDirectoryServiceTypes
(IContext context) Retrieves the list ofIThing
s that are portlets which implement theIDirService
interface.listPrincipalAttributeProviders
(IContext context, int type) Gets all the avaliableIPrincipalAttributeProvider
for a specific typeList the available roleslookupPrincipalByAlias
(IContext context, String alias) The aliases can be one of the following: ADMIN_USER_ALIAS: dir.admin.user EVERYONE_GROUP_ALIAS: dir.everyone.group GUEST_USER_ALIAS: dir.guest.user ADMIN_ROLE_ALIAS: dir.admin.rolelookupPrincipalByDN
(IContext context, String principalDN, int type) Attempts to lookup a principal by their dn.lookupPrincipalByID
(IContext context, String principalID, int type) Attempts to lookup a principal by their id.lookupPrincipalByURI
(IContext context, IURI principalUri) Attempts to lookup a principal by their dn.Methods inherited from interface com.webmethods.portal.system.IComponent
getComponentData, getComponentName, getComponentProvider, getURI, isInitialized, setComponentData, setComponentProvider
Methods inherited from interface com.webmethods.portal.system.init.IInitializable
init, shutdown
-
Method Details
-
authenticateUser
Attempts to authenticate the user based on the credentials with any registered directory service in their configured search order.- Parameters:
context
-userid
-password
-- Returns:
- an instance of
IDirUser
which holds critical information describing the user - Throws:
BizException
-
authenticateUser
IDirUser authenticateUser(IContext context, String userid, String password, boolean impersonate) throws BizException Attempts to authenticate the user based on the credentials with any registered directory service in their configured search order.- Parameters:
context
-userid
-password
-impersonate
- true if the current user context should switch to the authenticated user- Returns:
- an instance of
IDirUser
which holds critical information describing the user - Throws:
BizException
-
authenticateUser
default IDirUser authenticateUser(IContext context, String userID, String password, String oneTimePassword) throws BizException Attempts to authenticate the user based on the credentials with any registered directory service in their configured search order.- Parameters:
context
-userid
-password
-Time
- -Based One-Time Password for two-factor identification- Returns:
- an instance of
IDirUser
which holds critical information describing the user - Throws:
BizException
-
authenticateUser
default IDirUser authenticateUser(IContext context, String userID, String password, String oneTimePassword, boolean impersonate) throws BizException Attempts to authenticate the user based on the credentials with any registered directory service in their configured search order.- Parameters:
context
-userid
-password
-time
- -based one-time password for two-factor identificationimpersonate
- true if the current user context should switch to the authenticated user- Returns:
- an instance of
IDirUser
which holds critical information describing the user - Throws:
BizException
-
listRoles
List the available roles- Parameters:
context
-- Returns:
- the list of registered roles
- Throws:
BizException
-
listDirectoryServices
Retrieves the list ofIThing
s which are portlets which implement theIDirService
interface and are currently configured.- Parameters:
context
-- Returns:
- list of IThingIDs
- Throws:
BizException
-
listDirectoryServiceTypes
Retrieves the list ofIThing
s that are portlets which implement theIDirService
interface. These are default instances that are available to be published and configured, but are not currently active. Think of these as templates.- Parameters:
context
-- Returns:
- list of IThingIDs
- Throws:
BizException
-
listPrincipalAttributeProviders
Gets all the avaliableIPrincipalAttributeProvider
for a specific type- Parameters:
context
-type
- one ofcom.webmethods.portal.service.dir.IDirSystem.TYPE_USER
com.webmethods.portal.service.dir.IDirSystem.TYPE_GROUP
orcom.webmethods.portal.service.dir.IDirSystem.TYPE_ROLE
- Returns:
- list of thingids
- Throws:
BizException
-
lookupPrincipalByID
IDirPrincipal lookupPrincipalByID(IContext context, String principalID, int type) throws BizException Attempts to lookup a principal by their id. Delegates to the directory service in their configured search order. If found, this principal will be guaranteed to be initialized- Parameters:
context
-principalID
-type
- one ofcom.webmethods.portal.service.dir.IDirSystem.TYPE_USER
com.webmethods.portal.service.dir.IDirSystem.TYPE_GROUP
orcom.webmethods.portal.service.dir.IDirSystem.TYPE_ROLE
- Returns:
- the found IDirPrincipal or null
- Throws:
BizException
-
lookupPrincipalByDN
IDirPrincipal lookupPrincipalByDN(IContext context, String principalDN, int type) throws BizException Attempts to lookup a principal by their dn. Delegates to the directory service in their configured search order. If found, this principal will be guaranteed to be initialized- Parameters:
context
-principalDN
-type
- one ofcom.webmethods.portal.service.dir.IDirSystem.TYPE_USER
com.webmethods.portal.service.dir.IDirSystem.TYPE_GROUP
orcom.webmethods.portal.service.dir.IDirSystem.TYPE_ROLE
- Returns:
- the found IDirPrincipal or null
- Throws:
BizException
-
lookupPrincipalByURI
Attempts to lookup a principal by their dn. Delegates to the directory service in their configured search order. If found, this principal will be guaranteed to be initialized- Parameters:
context
-principalUri
-- Returns:
- the found IDirPrincipal or null
- Throws:
BizException
-
lookupPrincipalByAlias
The aliases can be one of the following:- ADMIN_USER_ALIAS: dir.admin.user
- EVERYONE_GROUP_ALIAS: dir.everyone.group
- GUEST_USER_ALIAS: dir.guest.user
- ADMIN_ROLE_ALIAS: dir.admin.role
- Throws:
BizException
-