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

Rearchitect the AAD authentication code to be object oriented #160

Merged
merged 6 commits into from
Jan 7, 2021

Conversation

yihezkel
Copy link
Member

Pull Request Description

Rearchitect the AAD authentication code to be object oriented and follow best-practices (Java and otherwise)


Future Release Comment

Breaking Changes:

  • Moved auth-related classes to new auth package

@yihezkel yihezkel requested review from ohadbitt and yogilad December 22, 2020 22:48
public class AccessTokenTokenProvider extends TokenProviderBase {
private final String accessToken;

AccessTokenTokenProvider(@NotNull String accessToken, @NotNull String clusterUrl, String authorityId) throws URISyntaxException {
Copy link
Contributor

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.

Copy link
Member Author

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).

Copy link
Member Author

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 ?

Copy link
Contributor

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

samples/src/main/java/TableStatus.java Show resolved Hide resolved
- Rename to CallbackTokenProvider
- Remove 2 unnecessarily-passed authorityIds
@yihezkel yihezkel requested a review from yogilad December 29, 2020 16:42
@yihezkel yihezkel merged commit f4da15d into master Jan 7, 2021
@yihezkel yihezkel deleted the reArchAadAuthObjectOriented branch April 4, 2021 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants