public final class ProcessMemberRequest extends Authentication implements ActionRequest
It is possible to create new Member Accounts in 2 different ways, both require the System Administrator. First is to use the CREATE action, and set the AccountName and Credentials directly. If this is not desirable, then the second version, INVITE, can be used ti create an Invitation, which will generate a signature which the invited Member can use to update their own Account and set the credentials without the System Administrator knowing of them.
Only the System Administrator can add new Members to the system, this limitation was added to prevent that the usage of a specific CWS instance is growing out of control. For many setups, it is also needed to prevent that anyone who should not be a Member, becomes a Member.
Action CREATE; This request can only be performed by the System Administrator, and requires that the name of the new Account is set, and it must be a unique name with 1 to 75 characters. It is also required, that the credentials (password / passphrase) is set, these should be of significant strength to ensure that it is not possible to easily crack it.
Action INVITE; This request can only be performed by the System Administrator, and only requires that the name of the new Account is set, the Account name must be unique and between 1 to 75 characters.
Action UPDATE; This request can be invoked by any Member, and will allow that the Account name, to a new unique and credentials is being updated. It should be noted, that the System Administrator cannot alter the Account Name, as this name is specifically used several internal operations.
Action INVALIDATE; This request does not take any parameters, as it will only work on the requesting Member, by re-generating the internal Asymmetric Key, used for accessing Circles. By re-issuing it, but not update the Circle access, the Account will appear to be working, but any request for data will result in errors. The Account can be restored, by having the access to each Circle re-created, but this must be done by the Circle Administrators of each Circle where the Member has access.
Action DELETE; if the request is invoked by the System Administrator, then it requires a Member Id, of the Member to be deleted. The Member will then be removed from the system. If a Member invokes the request, then the Member's Account will be deleted. Deleting an Account is an irreversible action. However, as there is no correlation stored regarding the data in the Circles which the Member belongs to, no data will be removed as part of this request.
For more details, please see the 'processMember' request in the Management
interface: Management.processMember(ProcessMemberRequest)
Constructor and Description |
---|
ProcessMemberRequest() |
Modifier and Type | Method and Description |
---|---|
Action |
getAction()
Retrieves the Action for the current request.
|
String |
getMemberId() |
MemberRole |
getMemberRole() |
String |
getNewAccountName() |
byte[] |
getNewCredential() |
String |
getPublicKey() |
void |
setAction(Action action)
Defines the action which should be performed by the request.
|
void |
setMemberId(String memberId) |
void |
setMemberRole(MemberRole memberRole) |
void |
setNewAccountName(String newAccountName) |
void |
setNewCredential(byte[] newCredential) |
void |
setPublicKey(String publicKey) |
Map<String,String> |
validate()
Simple Validation method, which checks if the required values are usable
or not.
|
getAccountName, getCredential, getCredentialType, setAccountName, setCredential, setCredentialType
checkIntegerWithMax, checkNotNull, checkNotNullAndValidId, checkNotNullEmptyOrTooLong, checkNotNullOrEmpty, checkNotNullOrEmpty, checkNotTooLong, checkUrl, checkValidId, isEmpty
public void setAction(Action action)
Defines the action which should be performed by the request.
setAction
in interface ActionRequest
action
- The Action to be performedpublic Action getAction()
Retrieves the Action for the current request.
getAction
in interface ActionRequest
public void setMemberId(String memberId)
public String getMemberId()
public void setMemberRole(MemberRole memberRole)
public MemberRole getMemberRole()
public void setPublicKey(String publicKey)
public String getPublicKey()
public void setNewAccountName(String newAccountName)
public String getNewAccountName()
public void setNewCredential(byte[] newCredential)
public byte[] getNewCredential()
public Map<String,String> validate()
validate
in class Authentication
Copyright © 2019 JavaDog.io. All rights reserved.