tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <>
Subject Re: Add custom Authenticator in context.xml
Date Mon, 06 Jul 2020 12:14:59 GMT
On 04/07/2020 19:54, Thomas Meyer wrote:
> Hi,
> a while ago I did write a little POC of how to add a custom
> authenticator scheme to tomcat.
> this is what I did come up with:
> It's rather complicated solution!
> Is there an more easy solution to add a custom authenticator scheme to a Context/context.xml?

How about:

1. Extract the file from catalina.jar
   (or from source)
2. Edit it to reference the custom Authenticator
3. Place it at $CATALINA_BASE/lib/org/apache/catalina/startup
4. Add the JAR with the custom authenticator to $CATALINA_BASE/lib

which would make it generally available to use in WEB-INF/web.xml


1. Add it directly to context.xml as:

className="de.m3y3r.catalina.authenticator.BearerTokenAuthenticator" />

which you would need to do for each app that wants to use it (or set it
in the global web.xml for all apps).


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message