This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes Tomcat and the fly likes Tomcat Realm Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat Realm" Watch "Tomcat Realm" New topic
Author

Tomcat Realm

pavani akella
Greenhorn

Joined: Feb 16, 2010
Posts: 3
Hi,

I am using Realm for authentication on my site.
The problem is it is accepting case insensitive username when authenticating.
i.e, If the user name is Username it is accepting and authenticating username. Is there any solution to this.
Any help is appreciated.

Regards,
Pavani
Tom Reilly
Rancher

Joined: Jun 01, 2010
Posts: 618
Hope this link helps: Tomcat Custom Realm.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17046
    
  26

I had the exact opposite problem, so I subclassed the JDBC realm to get case-insensitive passwords.

However, the generally accepted paradigm is that user IDs should be case-insensitive and passwords should be case-sensitive. Of course the various Unix-like OS's are case-sensitive on both, but the web is supposed to be more OS-independent.

Some of the standard realms may offer case-sensitivity switches as part of their basic config, so check the one you're using. I only did the subclass because I didn't have that option.


An IDE is no substitute for an Intelligent Developer.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Tomcat Realm
 
jQuery in Action, 3rd edition