Hi,

On 28/07/2019 01:11, Philipp Grigoryev wrote:
Hi All,

Is there a way to pass parameters to a custom authenticator which is instantiated by an embedded server from the config file? I’m trying to avoid complex doInit() where I’d need to go and read application properties for a couple of config params.

If you can grab the AuthenticatorInterceptor instance, then you cna use the getAuthenticators() method to get the existing set of authenticator, and inject a new Authenticator instance into this set, then call the setAuthenticator() method to reinject the set.

That means you can initialize an Authenticator the way you want, and inject it into the set of supported authenticators.

Now, this is a kind of a hack. The server does not provide a mean to configur an authenticator with some arguments. Typiclaly, the delegatingAuthenticator which requires a host and a port as a parameter is instanciated in a pretty static way by the ServiceBuilder class. That does not make the server a very pluggable system, when it comes to Authenticators...



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to