Skip to content

Commit 40d8ef0

Browse files
committed
Add modular JAR for custom auth plugin
1 parent a8bb96c commit 40d8ef0

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

src/docs/asciidoc/reference/connection/authenticationplugins.adoc

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,14 +115,26 @@ If you develop your own Firebird authentication plugin (or use a third-party aut
115115
* `org.firebirdsql.gds.ng.wire.auth.AuthenticationPluginSpi`
116116
* `org.firebirdsql.gds.ng.wire.auth.AuthenticationPlugin`
117117

118-
The SPI implementation needs to be listed in `META-INF/services/org.firebirdsql.gds.ng.wire.auth.AuthenticationPluginSpi` in your jar.
118+
The SPI implementation needs to be listed in `META-INF/services/org.firebirdsql.gds.ng.wire.auth.AuthenticationPluginSpi` in your JAR.
119+
120+
For a modular JAR, using Jaybird 6 or higher, the plugin will also need to be declared in `module-info.java`:
121+
122+
[source,java]
123+
----
124+
module org.example.auth {
125+
requires org.firebirdsql.jaybird;
126+
127+
provides org.firebirdsql.gds.ng.wire.auth.AuthenticationPluginSpi
128+
with org.example.MyAuthPlugin;
129+
}
130+
----
119131

120132
This support is experimental and comes with a number of caveats:
121133

122134
* We haven't tested this extensively (except for loading Jaybird's own plugins internally)
123135
* The authentication plugin (and provider) interfaces should be considered unstable;
124136
they may change with point-releases (although we will try to avoid that)
125-
* For now it will be necessary for the jar containing the authentication plugin to be loaded by the same class loader as Jaybird itself
137+
* For now, it is probably necessary for the JAR containing the authentication plugin to be loaded by the same class loader -- or at least, from the same classpath -- as Jaybird itself
126138

127139
If you implement a custom authentication plugin and run into problems, contact us on the https://groups.google.com/g/firebird-java[firebird-java Google Group^].
128140

0 commit comments

Comments
 (0)