@Override
    public Token getAccessToken(Token requestToken, Verifier verifier) {
        OAuthRequest request
                = new ProxyOAuthRequest(this.api.getAccessTokenVerb(),
                        this.api.getAccessTokenEndpoint(), this.proxyHost, this.proxyPort);
        String userpass = this.config.getApiKey() + ":" + this.config.getApiSecret();
        String basicAuth = "Basic " + javax.xml.bind.DatatypeConverter.printBase64Binary(userpass.getBytes());
        request.addHeader("Authorization", basicAuth);
        request.addBodyParameter("grant_type", "authorization_code");
        request.addBodyParameter("code", verifier.getValue());
        request.addBodyParameter("redirect_uri", config.getCallback());
        Response response = request.send();
        String body = response.getBody();
        JsonNode json = JsonHelper.getFirstNode(body);
        if (json != null) {
            return new Token((String) JsonHelper.get(json, "access_token"), "", body);
        } else {
            return null;
        }

    }
@Override
    public Token getAccessToken(Token requestToken, Verifier verifier) {
        OAuthRequest request
                = new ProxyOAuthRequest(this.api.getAccessTokenVerb(),
                        this.api.getAccessTokenEndpoint(), this.proxyHost, this.proxyPort);
        String userpass = this.config.getApiKey() + ":" + this.config.getApiSecret();
        String basicAuth = "Basic " + javax.xml.bind.DatatypeConverter.printBase64Binary(userpass.getBytes());
        request.addHeader("Authorization", basicAuth);
        request.addBodyParameter("grant_type", "authorization_code");
        request.addBodyParameter("code", verifier.getValue());
        request.addBodyParameter("redirect_uri", config.getCallback());
        Response response = request.send();
        String body = response.getBody();
        JsonNode json = JsonHelper.getFirstNode(body);
        if (json != null) {
            return new Token((String) JsonHelper.get(json, "access_token"), "", body);
        } else {
            return null;
        }

    }
@ Override public Token getAccessToken ( Token requestToken , Verifier verifier ) { OAuthRequest request = new ProxyOAuthRequest ( this . api . getAccessTokenVerb ( ) , this . api . getAccessTokenEndpoint ( ) , this . proxyHost , this . proxyPort ) ; String userpass = this . config . getApiKey ( ) + ":" + this . config . getApiSecret ( ) ; String basicAuth = "Basic " + javax . xml . bind . DatatypeConverter . printBase64Binary ( userpass . getBytes ( ) ) ; request . addHeader ( "Authorization" , basicAuth ) ; request . addBodyParameter ( "grant_type" , "authorization_code" ) ; request . addBodyParameter ( "code" , verifier . getValue ( ) ) ; request . addBodyParameter ( "redirect_uri" , config . getCallback ( ) ) ; Response response = request . send ( ) ; String body = response . getBody ( ) ; JsonNode json = JsonHelper . getFirstNode ( body ) ; if ( json != null ) { return new Token ( ( String ) JsonHelper . get ( json , "access_token" ) , "" , body ) ; } else { return null ; } }
Makes the call to request an access token for an authorized user.

@param requestToken not used.
@param verifier the code query parameter that Globus included in the
redirect after the authorization call.

@return the access token.
Makes the call to request an access token for an authorized user .