thitoh
unread,May 29, 2008, 2:41:44 PM5/29/08Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google Web Toolkit
To authentication, I created a module with a form with action:
GWT.getModuleBaseURL() + "/j_security_check"
And add to the form a TextBox with name j_username, and a
PasswordTextBox with name j_password.
I add a button with a ClickListener with:
public void onClick(Widget sender) {
form.submit();
}
It works fine! The authentication is working....
But how do I verify the roles that the user has????????
My application policy in login-config.xml is:
<application-policy name = "appl">
<authentication>
<login-module
code="org.jboss.security.auth.spi.UsersRolesLoginModule"
flag = "required">
<module-option name="usersProperties">props/appl-
users.properties</module-option>
<module-option name="rolesProperties">props/appl-
roles.properties</module-option>
</login-module>
</authentication>
</application-policy>
In props/appl-users.properties I put the users with passwords.. Like
this:
admin=passadmin
user2=mypassword
user3=12345
In props/appl-roles.properties I put the users and their roles.. Link
this:
admin=Administrators,Comm,Others
user2=Comm,White,Others
user3=Others
How do I verify in the user that is logged, has the role
Administrators, example... ?? What is the java code that I have to put
in a GWT Module?