Skip to content

Commit f514a35

Browse files
Update javadoc for getUsername (#2318)
Co-authored-by: Jameson Williams <[email protected]>
1 parent 1383637 commit f514a35

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

aws-android-sdk-mobile-client/src/main/java/com/amazonaws/mobile/client/AWSMobileClient.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -795,8 +795,12 @@ boolean isUserpoolsSignedIn() {
795795
}
796796

797797
/**
798-
* Returns the signed-in user's username obtained from the access token.
799-
* @return signed-in user's username
798+
* Returns the username attribute of the current access token. Note that the value stored in the username
799+
* attribute of the access token may vary depending on how sign-in was performed. For example, if the user signed in
800+
* with email, the username attribute will have the email address.
801+
* @return The username attribute of the current access token.
802+
* @see <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-using-tokens-with-identity-providers.html#amazon-cognito-user-pools-using-the-access-token">Using the Access Token</a>
803+
* from Cognito documentation.
800804
*/
801805
@AnyThread
802806
public String getUsername() {

0 commit comments

Comments
 (0)