Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CALCITE-6135] BEARER authentication support #232

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Aarchy
Copy link

@Aarchy Aarchy commented Nov 27, 2023

No description provided.


import java.io.IOException;

public class SingleBearerTokenProvider implements BearerTokenProvider {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That name sounds off. Every provider provides a single token (at a time).
Wouldn't SimpleBearerTokenProvider be more descriptive ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This object can provide a single token for its entire lifetime. Maybe Constant?
I'd avoid "Simple" as it may sound that the token is simple in some way.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Constant is better.

@stoty
Copy link
Contributor

stoty commented Nov 29, 2023

Can you open a [DISCUSS] thread on the calcite list about this change ?
Explain its background in some detail ?

@Aarchy
Copy link
Author

Aarchy commented Jan 24, 2024

@stoty Based on your suggestion on the devlist, token providers now can be plugged in via config properties. Users can define their custom properties and use it in token provider's init function. There's a very basic example in the tests.
On the other hand, the current way of handling properties is a bit confusing in my opinion. For now, I tried to just modify the necessary parts.

@Aarchy Aarchy requested a review from stoty February 5, 2024 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants