Skip to content

Commit 936b7c7

Browse files
author
daveta
committed
Fix single line if, add more comments
1 parent 57b7fc4 commit 936b7c7

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

  • libraries/bot-connector/src/main/java/com/microsoft/bot/connector/authentication

libraries/bot-connector/src/main/java/com/microsoft/bot/connector/authentication/OAuthClient.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public OAuthClient(ConnectorClientImpl client, String uri) throws URISyntaxExcep
6868
* @param userId
6969
* @param connectionName
7070
* @param magicCode
71-
* @return
71+
* @return CompletableFuture< TokenResponse > on success; otherwise null.
7272
*/
7373
public CompletableFuture<TokenResponse> GetUserTokenAsync(String userId, String connectionName, String magicCode) throws IOException, URISyntaxException, ExecutionException, InterruptedException {
7474
return GetUserTokenAsync(userId, connectionName, magicCode, null);
@@ -97,7 +97,7 @@ protected URI MakeUri(String uri, HashMap<String, String> queryStrings) throws U
9797
@param magicCode
9898
@param customHeaders
9999
100-
@return
100+
@return CompletableFuture< TokenResponse > on success; null otherwise.
101101
*/
102102
public CompletableFuture<TokenResponse> GetUserTokenAsync(String userId, String connectionName, String magicCode, Map<String, ArrayList<String>> customHeaders) throws IllegalArgumentException {
103103
if (StringUtils.isEmpty(userId)) {
@@ -112,8 +112,9 @@ public CompletableFuture<TokenResponse> GetUserTokenAsync(String userId, String
112112
HashMap <String, String> qstrings = new HashMap<>();
113113
qstrings.put("userId", userId);
114114
qstrings.put("connectionName", connectionName);
115-
if (!StringUtils.isBlank(magicCode))
115+
if (!StringUtils.isBlank(magicCode)) {
116116
qstrings.put("code", magicCode);
117+
}
117118
String strUri = String.format("%sapi/usertoken/GetToken", this.uri);
118119
URI tokenUrl = null;
119120
try {
@@ -167,7 +168,7 @@ else if (statusCode == HTTP_NOT_FOUND) {
167168
* Signs Out the User for the given ConnectionName.
168169
* @param userId
169170
* @param connectionName
170-
* @return True on successful sign-out. False otherwise.
171+
* @return True on successful sign-out; False otherwise.
171172
*/
172173
public CompletableFuture<Boolean> SignOutUserAsync(String userId, String connectionName) throws URISyntaxException, IOException {
173174
if (StringUtils.isEmpty(userId)) {
@@ -230,7 +231,7 @@ public CompletableFuture<Boolean> SignOutUserAsync(String userId, String connect
230231
* Gets the Link to be sent to the user for signin into the given ConnectionName
231232
* @param activity
232233
* @param connectionName
233-
* @return Sign in link string.
234+
* @return Sign in link on success; null otherwise.
234235
*/
235236
public CompletableFuture<String> GetSignInLinkAsync(Activity activity, String connectionName) throws IllegalArgumentException, URISyntaxException, JsonProcessingException {
236237
if (StringUtils.isEmpty(connectionName)) {

0 commit comments

Comments
 (0)