def acquire_token_for_user(resource, client_cred, user)
      fail_if_arguments_nil(resource, client_cred, user)
      token_request_for(client_cred)
        .get_with_user_credential(user, resource)
    end
def acquire_token_for_user(resource, client_cred, user)
      fail_if_arguments_nil(resource, client_cred, user)
      token_request_for(client_cred)
        .get_with_user_credential(user, resource)
    end
Gets an acccess token with a previously acquired user token.
 Gets an access token for a specific user. This method is relevant for
 three authentication scenarios:

 1. Username/Password flow:
 Pass in the username and password wrapped in an ADAL::UserCredential.

 2. On-Behalf-Of flow:
 This allows web services to accept access tokens users and then exchange
 them for access tokens for a different resource. Note that to use this
 flow you must properly configure permissions settings in the Azure web
 portal. Pass in the access token wrapped in an ADAL::UserAssertion.

 3. User Identifier flow:
 This will not make any network connections but will merely check the cache
 for existing tokens matching the request.

 @param String resource
   The intended recipient of the requested token.
 @param ClientCredential|ClientAssertion|ClientAssertionCertificate
   An object that validates the client application by adding
   #request_params to the OAuth request.
 @param UserAssertion|UserCredential|UserIdentifier
   An object that validates the client that the requested access token is
   for. See the description above of the various flows.
 @return TokenResponse