-
Notifications
You must be signed in to change notification settings - Fork 110
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
Improving dialog-based acquireToken javadocs #1268
Merged
Merged
Changes from 1 commit
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -560,14 +560,16 @@ && checkADFSValidationRequirements(loginHint, callback)) { | |
} | ||
|
||
/** | ||
* This uses new dialog based prompt. It will create a handler to run the | ||
* dialog related code. It will start interactive flow if needed. It checks | ||
* the cache to return existing result if not expired. It tries to use | ||
* refresh token if available. If it fails to get token with refresh token, | ||
* behavior will depend on options. If promptbehavior is AUTO, it will | ||
* remove this refresh token from cache and fall back on the UI. Default is | ||
* AUTO. | ||
* | ||
* acquireToken will authorize an end user to call the specified resource. | ||
* The minted access token will be sent to the {@link AuthenticationCallback} | ||
* and can be used to call the specified protected resource. | ||
* By default, acquireToken will attempt to fulfill the request silently, and | ||
* perform an interactive login if needed or explicitly specified in | ||
* the request. This overload uses an | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There are two-spaces after the period in the javadoc. Just a formatting thing. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bad habit :) |
||
* [AlertDialog](https://developer.android.com/guide/topics/ui/dialogs) | ||
* in cases UI is required. This overload does not support any flow | ||
danieldobalian marked this conversation as resolved.
Show resolved
Hide resolved
|
||
* requiring a | ||
* [token broker](https://github.com/AzureAD/azure-activedirectory-library-for-android/wiki/Broker). | ||
* @param resource required resource identifier. | ||
* @param clientId required client identifier. | ||
* @param redirectUri Optional. It will use packagename and provided suffix | ||
|
@@ -602,9 +604,15 @@ && checkADFSValidationRequirements(loginHint, callback)) { | |
} | ||
|
||
/** | ||
* acquireToken will start an interactive auth flow to acquire new tokens | ||
* with the requested claims. Bypasses token cache if promptbehavior is not AUTO or claims are passed. This overload uses new dialog based prompt. | ||
* It will create a handler to run the dialog related code. | ||
* acquireToken will authorize an end user to call the specified resource. | ||
* The minted access token will be sent to the {@link AuthenticationCallback} | ||
danieldobalian marked this conversation as resolved.
Show resolved
Hide resolved
|
||
* and can be used to call the specified protected resource. | ||
* Bypasses token cache if @param prompt is not AUTO or claims are passed. | ||
* This overload uses an | ||
* [AlertDialog](https://developer.android.com/guide/topics/ui/dialogs) | ||
* in cases UI is required. This overload does not support any flow | ||
danieldobalian marked this conversation as resolved.
Show resolved
Hide resolved
danieldobalian marked this conversation as resolved.
Show resolved
Hide resolved
|
||
* requiring a | ||
* [token broker](https://github.com/AzureAD/azure-activedirectory-library-for-android/wiki/Broker). | ||
* | ||
* @param resource required resource identifier. | ||
* @param clientId required client identifier. | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Note about clarity: "minted" may confuse users into thinking that our library creates access tokens when, in reality, they are given to us.
How about:
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 call out. Fixed.