[prev in list] [next in list] [prev in thread] [next in thread] 

List:       tomcat-dev
Subject:    [Bug 63505] enhancement - support of stored procedures for DataSourceRealm authentication
From:       bugzilla () apache ! org
Date:       2020-07-27 16:17:40
Message-ID: bug-63505-78-wWQwL34lUa () https ! bz ! apache ! org/bugzilla/
[Download RAW message or body]

https://bz.apache.org/bugzilla/show_bug.cgi?id=63505

--- Comment #6 from Christopher Schultz <chris@christopherschultz.net> ---
(In reply to Eugène Adell from comment #5)
> Exactly, both files are the same except I needed to override these 2
> functions and also add variables for handling the procedures names (and what
> comes with them : getters/setters of course). Maybe making it a child class
> of DataSourceRealm, but would it be really clean this way ?

I was thinking maybe creating DataSourceRealmBase and pulling all the shared
capabilities between DataSourceRealm and your class up into that class. In
fact, I might even make DataSourceRealm a trivial subclass of a new
DataSourceViaPSRealm class which extends DataSourceRealmBase and contains the
code to perform the authentication via PreparedStatements.

Like this:

DataSourceRealmBase
    /       \
DSViaPS    DSViaSP
   |
DataSourceRealm

I'd do this because DataSourceRealm isn't a good name for what it does since
your realm is also a "DataSourceRealm". But we can't just remove classes from
Tomcat since they could be used as base classes by other code.

There is probably scope to refactor this set of classes and also the JDBCRealm
(because you can authenticate a DS realm using either PS or SP), although
JDBCRealm should probably just die so it's not really worth it.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic