use of com.microsoft.identity.internal.testutils.mocks.MockSuccessAuthorizationResultNetworkTests in project microsoft-authentication-library-common-for-android by AzureAD.
the class ResourceOwnerPasswordCredentialsTestStrategy method requestAuthorization.
/**
* Template method for executing an OAuth2 authorization request.
*
* @param request microsoft sts authorization request.
* @param authorizationStrategy authorization strategy.
* @return GenericAuthorizationResponse
*/
@Override
public Future<AuthorizationResult> requestAuthorization(final MicrosoftStsAuthorizationRequest request, final AuthorizationStrategy authorizationStrategy) {
final MockSuccessAuthorizationResultNetworkTests authorizationResult = new MockSuccessAuthorizationResultNetworkTests();
final ResultFuture<AuthorizationResult> future = new ResultFuture<>();
future.setResult(authorizationResult);
return future;
}
Aggregations