Interface AccountManagementService
-
- All Known Implementing Classes:
AccountManagementPlugin
public interface AccountManagementService
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_PRIVATE_WORKSPACE_NAME
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Topic
_createUserAccount(Credentials cred)
Creates a user account.void
changePassword(Credentials currentCred, Credentials newCred)
Changes the password of an account to the newly given credentials.Topic
createUserAccount(Credentials cred)
Creates a user account.List<String>
getAccountManagerNames()
Returns a list of known registered account manager names.String
getConfiguredAccountManagerName()
Returns the account manager name that is configured to be used by the platform by default.void
registerAccountManager(AccountManager accountManager)
Register anAccountManager
instance with the platform.void
unregisterAccountManager(AccountManager accountManager)
Unregisters anAccountManager
instance from the platform.
-
-
-
Field Detail
-
DEFAULT_PRIVATE_WORKSPACE_NAME
static final String DEFAULT_PRIVATE_WORKSPACE_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
registerAccountManager
void registerAccountManager(AccountManager accountManager)
Register anAccountManager
instance with the platform. The instance is used to derive anAuthorizationMethod
instance that is registered with the same name.- Parameters:
accountManager
-
-
unregisterAccountManager
void unregisterAccountManager(AccountManager accountManager)
Unregisters anAccountManager
instance from the platform. AnAuthorizationMethod
instance with the same is unregistered automatically as well.- Parameters:
accountManager
-
-
getAccountManagerNames
List<String> getAccountManagerNames()
Returns a list of known registered account manager names.- Returns:
-
getConfiguredAccountManagerName
String getConfiguredAccountManagerName()
Returns the account manager name that is configured to be used by the platform by default.- Returns:
-
createUserAccount
Topic createUserAccount(Credentials cred)
Creates a user account. Only DMX admins are allowed to create user accounts.The user is created either with the configured account manager of the platform or with the account manager that is specified throught the "method" property of the
Credentials
instance.- Returns:
- The "Username" topic of the created user account.
- Throws:
RuntimeException
- if the requesting user is not a DMX admin.
-
_createUserAccount
Topic _createUserAccount(Credentials cred)
Creates a user account. This is a privileged method: no permissions are checked.The user is created either with the configured account manager of the platform or with the account manager that is specified throught the "method" property of the
Credentials
instance.Security: this method is not callable from outside as it has no REST interface. So the DMX platform is still secure. On the other hand, a 3rd-party plugin which provides a RESTful interface to this method is required to apply an additional authorization measure, e.g. a short-living access token sent via email.
- Returns:
- The "Username" topic of the created user account.
-
changePassword
void changePassword(Credentials currentCred, Credentials newCred)
Changes the password of an account to the newly given credentials.Depending on the system that ultimately performs the password change, the current credentials are necessary. It can be
null
if not necessary.- Parameters:
currentCred
- Current credentials of the account whose password is to be changed.newCred
- Credentials containing the new password.
-
-