Package com.google.api.ads.common.lib.auth

Examples of com.google.api.ads.common.lib.auth.OfflineCredentials$Builder


            + "\"token_type\" : \"Bearer\","
            + "\"expires_in\" : 3600,"
            + "\"refresh_token\" : \"newRefreshToken2\"}",
        SoapResponseXmlProvider.getTestSoapResponse(API_VERSION)));

    OfflineCredentials offlineCredentials =
        new OfflineCredentials.Builder()
            .forApi(OfflineCredentials.Api.DFP)
            .withTokenUrlServer(testHttpServer.getServerUrl())
            .fromFile(
                DfpAxisSoapIntegrationTest.class.getResource("props/ads-test.properties"))
            .build();

    Credential credential = offlineCredentials.generateCredential();

    assertTrue(testHttpServer.getLastRequestBody().contains("grant_type=refresh_token"));
    assertTrue(testHttpServer.getLastRequestBody().contains("refresh_token=refreshToken"));
    assertTrue(testHttpServer.getLastRequestBody().contains("client_id=clientId"));
    assertTrue(testHttpServer.getLastRequestBody().contains("client_secret=clientSecret"));
View Full Code Here

TOP

Related Classes of com.google.api.ads.common.lib.auth.OfflineCredentials$Builder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.