Re: BASIC Authentication for Custom Realm

2005-03-29 Thread Mark Thomas
Based on my own experience, the quickest way to work out what is 
happening will be to debug your way through it. See the FAQ for how to 
set this up: http://jakarta.apache.org/tomcat/faq/development.html

Mark
Mudumbai, Kalyan wrote:
Hi All,
I am trying to write a custom realm for my web application. I have added the
realm in the sever.xml file as below:
Realm className=com.web.tomcat.security.CustomRealm debug=0/
and I had the following entries in my web.xml file.
security-constraint
web-resource-collection
web-resource-namewebfiles/web-resource-name
url-pattern/*/url-pattern
/web-resource-collection
auth-constraint
role-nameeveryone/role-name
/auth-constraint
/security-constraint
login-config
auth-methodBASIC/auth-method
realm-nameCustomRealm/realm-name
/login-config
security-role
role-nameeveryone/role-name
/security-role
When I access a page in my app, I'm expecting to get a Login Dialog box
that's provided by the web browser. But it doesn't happen, when I try to
access a web page.
If I remove my custom realm entry in the server.xml, the login dialog
appears. Has the appearance of the Login Dialog got to do anything with the
Realm? 

Can someone please let me know what's going wrong here?
Thanks,
Kalyan.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


BASIC Authentication for Custom Realm

2005-03-28 Thread Mudumbai, Kalyan
Hi All,

I am trying to write a custom realm for my web application. I have added the
realm in the sever.xml file as below:

Realm className=com.web.tomcat.security.CustomRealm debug=0/

and I had the following entries in my web.xml file.

security-constraint
web-resource-collection
web-resource-namewebfiles/web-resource-name
url-pattern/*/url-pattern
/web-resource-collection
auth-constraint
role-nameeveryone/role-name
/auth-constraint
/security-constraint
login-config
auth-methodBASIC/auth-method
realm-nameCustomRealm/realm-name
/login-config
security-role
role-nameeveryone/role-name
/security-role

When I access a page in my app, I'm expecting to get a Login Dialog box
that's provided by the web browser. But it doesn't happen, when I try to
access a web page.
If I remove my custom realm entry in the server.xml, the login dialog
appears. Has the appearance of the Login Dialog got to do anything with the
Realm? 

Can someone please let me know what's going wrong here?

Thanks,
Kalyan.