-
Notifications
You must be signed in to change notification settings - Fork 43
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
Rearchitect the AAD authentication code to be object oriented #160
Conversation
…low best-practices (Java and otherwise)
…low best-practices (Java and otherwise)
public class AccessTokenTokenProvider extends TokenProviderBase { | ||
private final String accessToken; | ||
|
||
AccessTokenTokenProvider(@NotNull String accessToken, @NotNull String clusterUrl, String authorityId) throws URISyntaxException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The authId here is redundent.
You may want to be tolerant of authId being null.
The same goes for clusterURL.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch with authId
I think the clusterUrl should be required in a CSB (even though it's only somewhat enforced currently - I brought this up in another thread elsewhere, I'll look that up). Further, in this MSAL implementation, it's useful to always have it available to include for example in exception handling (even though it's not currently used in all classes' flows).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you agree/comfortable with my approach, @yogilad ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you should request parameters you do not use in practice
data/src/main/java/com/microsoft/azure/kusto/data/auth/ApplicationCertificateTokenProvider.java
Show resolved
Hide resolved
data/src/main/java/com/microsoft/azure/kusto/data/auth/ApplicationKeyTokenProvider.java
Outdated
Show resolved
Hide resolved
data/src/main/java/com/microsoft/azure/kusto/data/auth/PublicAppTokenProviderBase.java
Show resolved
Hide resolved
data/src/main/java/com/microsoft/azure/kusto/data/auth/TokenProviderBase.java
Outdated
Show resolved
Hide resolved
data/src/main/java/com/microsoft/azure/kusto/data/auth/UserPromptTokenProvider.java
Show resolved
Hide resolved
data/src/main/java/com/microsoft/azure/kusto/data/auth/UserPromptTokenProvider.java
Show resolved
Hide resolved
data/src/main/java/com/microsoft/azure/kusto/data/auth/UserPromptTokenProvider.java
Show resolved
Hide resolved
data/src/main/java/com/microsoft/azure/kusto/data/auth/UserPromptTokenProvider.java
Show resolved
Hide resolved
- Rename to CallbackTokenProvider - Remove 2 unnecessarily-passed authorityIds
Pull Request Description
Rearchitect the AAD authentication code to be object oriented and follow best-practices (Java and otherwise)
Future Release Comment
Breaking Changes: