public Future<AuthenticationResult> acquireTokenByAuthorizationCode(
            final String authorizationCode, final URI redirectUri,
            final AsymmetricKeyCredential credential, final String resource,
            final AuthenticationCallback callback)
            throws AuthenticationException {
        this.validateAuthCodeRequestInput(authorizationCode, redirectUri,
                credential, resource);
        return this.acquireTokenByAuthorizationCode(authorizationCode,
                redirectUri, JwtHelper
                        .buildJwt(credential, this.authenticationAuthority
                                .getSelfSignedJwtAudience()), resource,
                callback);
    }
public Future < AuthenticationResult > acquireTokenByAuthorizationCode ( final String authorizationCode , final URI redirectUri , final AsymmetricKeyCredential credential , final String resource , final AuthenticationCallback callback ) throws AuthenticationException { this . validateAuthCodeRequestInput ( authorizationCode , redirectUri , credential , resource ) ; return this . acquireTokenByAuthorizationCode ( authorizationCode , redirectUri , JwtHelper . buildJwt ( credential , this . authenticationAuthority . getSelfSignedJwtAudience ( ) ) , resource , callback ) ; }
Acquires security token from the authority using an authorization code
previously received.

@param authorizationCode
The authorization code received from service authorization
endpoint.
@param redirectUri
The redirect address used for obtaining authorization code.
@param credential
object representing Private Key to use for token acquisition.
@param resource
Identifier of the target resource that is the recipient of the
requested token. It can be null if provided earlier to acquire
authorizationCode.
@param callback
optional callback object for non-blocking execution.
@return A {@link Future} object representing the
{@link AuthenticationResult} of the call. It contains Access
Token, Refresh Token and the Access Token's expiration time.
@throws AuthenticationException
thrown if {@link AsymmetricKeyCredential} fails to sign the
JWT token.