public Future < AuthenticationResult > acquireToken ( final String resource , final UserAssertion userAssertion , final AsymmetricKeyCredential credential , final AuthenticationCallback callback ) { this . validateOnBehalfOfRequestInput ( resource , userAssertion , credential , true ) ; ClientAssertion clientAssertion = JwtHelper . buildJwt ( credential , this . authenticationAuthority . getSelfSignedJwtAudience ( ) ) ; final ClientAuthentication clientAuth = createClientAuthFromClientAssertion ( clientAssertion ) ; return acquireTokenOnBehalfOf ( resource , userAssertion , clientAuth , callback ) ; }
Acquires an access token from the authority on behalf of a user . It requires using a user token previously received . Uses certificate to authenticate client .