Using The Java API to Authenticate a user

Has anyone used the webMethods Java API (The UGClass,User and Group classes) to check a userid/password combination. I have attempted to write a simple service but am not having much luck - thanks.

Bill

Bill,

There is an example module for workflow custom authentication under Best Practices->Utilities and Samples. That might be the best place to start

– Tim

Are you trying to use the UserManager function?

User usr = UserManager.getUser(userName);

That will return the username…the password might be a bit more tricky…good luck

bill,
To authenticate a user (and password), you have to write a AuthenticationModule.

For details on this, contact WmSupport to the Authentication Module Guide.
OR

use com.wm.app.b2b.server
Class UGClass; method checkPassword

public boolean checkPassword(java.lang.String guess)
Verifies the password of this UG. The supplied guess is checked against the set password. Null passwords match any guess; otherwise a strict match is required.

For details on this, refer to the webM API.

Let me know, if you have more questions on this.

  • Saurabh

Writing a custom authentication module is a good idea and using the custom module only the valid users recognized by the IS cache will be able to connect and you can manage the passwords externally.