Where are the implementations for the CredentialsExtractor.java interface?

Hey,

I’ve decided to make some custom authentication logic and was looking at the code when I ran into the CredentialsExtractor interface. Problem is I cannot find any implementations of it, even though the interface is used in logic in e.g. the AuthenticationHandler class.

Searching through the whole github organization turned up nothing either.

Any ideas where is the implementation for that interface? Or is it handled by some runtime Karaf magic?

The interface got copied over from Eclipse SmartHome but the implementation didn’t:

It’s probably unused now.

Its a legacy code which is abandoned in favor of jaxrs request filters which extract authentication information directly. Extractors were intended to work with servlets, jaxrs and form authentication, if needed.
Back when it was made it was primarily responsible for extracting basic authentication data and passing it to AuthenticationManager for processing by compatible AuthenticationProvider implementations.
The present code does implement only last interface, but does not make use/complete flow.
I have made some work around this topic in opensmarthouse fork few years ago: [WIP] Reorganization of authentication and security API. by splatch · Pull Request #26 · opensmarthouse/opensmarthouse-core · GitHub, but there is so far no such thing for OH itself.
There is another issue/pull request which was trying to introduce fine grained controls for items, you may look into OH core to check progress there.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.