Re: Add ability for Realm authentication to tell the user the reason for auth failure

2004-01-28 Thread [Carlos H.]
On Friday 23 January 2004 20:59, Remy Maucherat wrote:
 - 26236 about the JAAS realm: it would be a very useful fix, and
 shouldn't be too complex

Well... I've tried to reproduce the bug... I've created my own LoginModule, 
and two classes wich implements de java.security.Principal interface (one for 
the user principal and other to the roles principals) just like the bug 
description said, and it worked fine! 

I also couldn't figure out how the method hasRole() in the RealmBase class can 
be related to this problem because the method createPrincipal() (which is 
called by the authenticate() method in the JAASRealm class) creates a 
GenericPrincipal, as expected by the hasRole() method. 

I think the problem can be related to the LoginModule of the user application, 
maybe it's not returning any RolePrincipal or something like that.

As a new guy to the tomcat source-code, I can be just missunderstanding 
something... any ideas?

Thanks in advance!

-- 
Carlos H. ([EMAIL PROTECTED])
Núcleo de Informática UNERJ
UNERJ - Centro Universitário de Jaraguá do Sul


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



Add ability for Realm authentication to tell the user the reason for auth failure

2004-01-23 Thread [Carlos H.]
Hi all, 

First of all: My name is Carlos and I'm new here. (I have entered the list a 
few days ago) And I'm still trying to understand the tomcat source code... 
oh... and I'm not from USA...my english is not perfect, but I hope I can be 
usefull anyway ;)

I was looking for something to work on, and I found this in BugZilla: http://
issues.apache.org/bugzilla/show_bug.cgi?id=25953

I know this is a minor enhancement but I think It's a good place for me to 
start. Before start coding (or even thinking about it) I would like to know 
if anyone already did it!

Thinking about the issue, I couldn't figure out how to do it without changing 
the signature of the authenticate() method (which is the worst choice, I 
think) or creating a new method that can throw some kind of exception to be 
catched by the user application (maybe deprecating the authenticate() ??). Do 
you have any ideas?

Thanks in advance for your help . 

-- 
Carlos H. ([EMAIL PROTECTED])


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