on 10-01-2008 12:47 PM
Hello All,
I am creating web application in which I am passing User name
and password.
In case of password it give some BO specific error like.
1) password should be 6 character.
2) password must contain number and alphanumeric value.
it is application using BO SDK.
it is possible that I can create User in BO with any password(BO SDK)
or I want to enter according to BO validation?
Please help me.
Regards,
Prashant Joshi
OK, that makes sense - I think I can fight my way thru the various aliases for these cats.
Thanks a LOT for taking the time to answer this.
Brent
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ted,
Now I'm more confused - I think my question is if I can change a password, can I also reset a user that's marked as "Disabled" with the same method.
Walking thru the class libraries, I don't see this, and I have not found how BO does it in the CMC yet.
Any suggestions?
Thanks,
Brent
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did you look at the doc for IUserAlias?
Get the Aliases from IUser, and enable each.
Here's the reasoning for the design:
An User can have multiple authentication entries - possible are secEnterprise, secWinAD, secLDAP and secWindowsNT.
The different types are encapsulated using IUserAlias - so you get the collection of all aliases associated with the user using IUser.getAliases().
To allow for enabling/disabling each authentication for a user, you enable/disable each IUserAlias.
So you won't have enable/disable property for the IUser, but for the IUserAlias.
Note that a "Password" for the IUser is not associated with an IUserAlias, but only for IUser. This is because only one - the secEnterprise - allows you to change passwords via the SDK. All other authentication types have control over user passwords via the 3rd party authentication plugin.
Sincerely,
Ted Ueda
I'm trying to use this to reset user accounts, but it does not reset a disabled user - is that possibe?
I tried this, but the method is not valid - am I missing something?
((IUser)iUser).setNewPassword ("password#1"); // WORKS
((IUser)iUser).setDisabled(false); // FAILS
Thanks,
Brent
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Default configuration of Enterprise authentication is to reject passwords that are too simple - too short or not having both alpha and numeric characters.
You can configure Enterprise authentication on the CMC to disable this check.
Sincerely,
Ted Ueda
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You need to refer to BO Validation
Here is a snippet code
void addUserAndProperties(IInfoStore infoStore, String accountName, String userName, String description, boolean namedUser, boolean passwordNeverExpires, boolean mustChangePassword, boolean cannotChangePassword, String password)
{
try{
// Call the addUser method to create the new user account.
int newUserID = addUser (infoStore, accountName, userName, description);
// Retrieve the specified user object.
IInfoObjects rUser = infoStore.query("Select SI_ID, SI_PROGID From "
+ "CI_SYSTEMOBJECTS Where SI_ID=" + newUserID);
if (rUser.size() == 0)
{
//The query returned a blank collection (no object found).
throw new Error("The user could not be found.");
}
IInfoObject iUser = (IInfoObject) rUser.get(0);
// Check that the InfoObject has the User ProgID.
String uProgID = (String) iUser.properties()
.getProperty(CePropertyID.SI_PROGID).getValue();
if (uProgID.equals(CeProgID.USER))
{
// Set the user object's plugin-specific properties.
((IUser)iUser).setFullName (userName);
((IUser)iUser).setPasswordExpiryAllowed (passwordNeverExpires);
((IUser)iUser).setPasswordToChangeAtNextLogon (mustChangePassword);
((IUser)iUser).setPasswordChangeAllowed (cannotChangePassword);
((IUser)iUser).setNewPassword (password);
//((IUser)iUser).setDescription(((IUser)iUser).getFullName());
if (namedUser)
{
((IUser)iUser).setConnection(0);
}
else
{
((IUser)iUser).setConnection(1);
}
infoStore.commit (rUser);
}
}catch (SDKException e) {
System.err.println("Failed to add the user's properties. Exception caught: " + e.getMessage());
}
}
Cheers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.