RestUserToken Class
- java.lang.Object
- com.microsoft.bot.connector.rest.RestUserToken
Implements
public class RestUserToken
implements UserToken
An instance of this class provides access to all the operations defined in UserTokens.
Constructor Summary
Method Summary
| Modifier and Type |
Method and Description |
|
java.util.concurrent.CompletableFuture<TokenResponse>
|
exchangeToken(String userId, String connectionName, String channelId, TokenExchangeRequest exchangeRequest)
|
|
java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,TokenResponse>>
|
getAadTokens(String userId, String connectionName, AadResourceUrls aadResourceUrls)
|
|
java.util.concurrent.CompletableFuture<java.util.Map<java.lang.String,TokenResponse>>
|
getAadTokens(String userId, String connectionName, AadResourceUrls aadResourceUrls, String channelId)
|
|
java.util.concurrent.CompletableFuture<TokenResponse>
|
getToken(String userId, String connectionName)
|
|
java.util.concurrent.CompletableFuture<TokenResponse>
|
getToken(String userId, String connectionName, String channelId, String code)
|
|
java.util.concurrent.CompletableFuture<java.util.List<TokenStatus>>
|
getTokenStatus(String userId)
|
|
java.util.concurrent.CompletableFuture<java.util.List<TokenStatus>>
|
getTokenStatus(String userId, String channelId, String include)
|
|
java.util.concurrent.CompletableFuture<java.lang.Void>
|
sendEmulateOAuthCards(boolean emulateOAuthCards)
Send a dummy OAuth card when the bot is being used on the Emulator for testing without fetching a real token.
|
|
java.util.concurrent.CompletableFuture<java.lang.Object>
|
signOut(String userId)
|
|
java.util.concurrent.CompletableFuture<java.lang.Object>
|
signOut(String userId, String connectionName, String channelId)
|
Methods inherited from java.lang.Object
java.lang.Object.clone
java.lang.Object.equals
java.lang.Object.finalize
java.lang.Object.getClass
java.lang.Object.hashCode
java.lang.Object.notify
java.lang.Object.notifyAll
java.lang.Object.toString
java.lang.Object.wait
java.lang.Object.wait
java.lang.Object.wait
Constructor Details
RestUserToken
public RestUserToken(Retrofit withRetrofit, RestOAuthClient withClient)
Initializes an instance of UserTokensImpl.
Parameters:
withRetrofit
- the Retrofit instance built from a Retrofit Builder.
withClient
- the instance of the service client containing this
operation class.
Method Details
exchangeToken
public CompletableFuture exchangeToken(String userId, String connectionName, String channelId, TokenExchangeRequest exchangeRequest)
Parameters:
userId
- the String value
connectionName
- the String value
channelId
- the String value
exchangeRequest
- a TokenExchangeRequest
Returns:
the observable to the TokenResponse object
getAadTokens
public CompletableFuture
Parameters:
userId
- the String value
connectionName
- the String value
aadResourceUrls
- the AadResourceUrls value
Returns:
the observable to the Map<String, TokenResponse> object
getAadTokens
public CompletableFuture
Parameters:
userId
- the String value
connectionName
- the String value
aadResourceUrls
- the AadResourceUrls value
channelId
- the String value
Returns:
the observable to the Map<String, TokenResponse> object
getToken
public CompletableFuture getToken(String userId, String connectionName)
Parameters:
userId
- the String value
connectionName
- the String value
Returns:
the observable to the TokenResponse object
getToken
public CompletableFuture getToken(String userId, String connectionName, String channelId, String code)
Parameters:
userId
- the String value
connectionName
- the String value
channelId
- the String value
code
- the String value
Returns:
the observable to the TokenResponse object
getTokenStatus
public CompletableFuture> getTokenStatus(String userId)
Parameters:
userId
- the String value
Returns:
the observable to the List<TokenStatus> object
getTokenStatus
public CompletableFuture> getTokenStatus(String userId, String channelId, String include)
Parameters:
userId
- the String value
channelId
- the String value
include
- the String value
Returns:
the observable to the List<TokenStatus> object
sendEmulateOAuthCards
public CompletableFuture sendEmulateOAuthCards(boolean emulateOAuthCards)
Send a dummy OAuth card when the bot is being used on the Emulator for testing without fetching a real token.
Parameters:
emulateOAuthCards
- Indicates whether the Emulator should emulate the OAuth card.
Returns:
A task that represents the work queued to execute.
signOut
public CompletableFuture