Class MockTokenServerTransport (1.35.2)
Stay organized with collections
Save and categorize content based on your preferences.
public class MockTokenServerTransport extends MockHttpTransport
Beta
A test transport that simulates Google's token server for refresh tokens and service accounts.
Inheritance
java.lang.Object >
com.google.api.client.http.HttpTransport >
com.google.api.client.testing.http.MockHttpTransport >
MockTokenServerTransport
Inherited Members
com.google.api.client.http.HttpTransport.createRequestFactory()
com.google.api.client.http.HttpTransport.createRequestFactory(com.google.api.client.http.HttpRequestInitializer)
com.google.api.client.http.HttpTransport.isMtls()
com.google.api.client.http.HttpTransport.shutdown()
com.google.api.client.testing.http.MockHttpTransport.buildRequest(java.lang.String,java.lang.String)
com.google.api.client.testing.http.MockHttpTransport.getLowLevelHttpRequest()
com.google.api.client.testing.http.MockHttpTransport.getSupportedMethods()
com.google.api.client.testing.http.MockHttpTransport.supportsMethod(java.lang.String)
Constructors
MockTokenServerTransport()
public MockTokenServerTransport()
MockTokenServerTransport(String tokenServerUrl)
public MockTokenServerTransport(String tokenServerUrl)
Parameter
Name | Description |
tokenServerUrl | String
|
Methods
addClient(String clientId, String clientSecret)
public void addClient(String clientId, String clientSecret)
Parameters
addRefreshToken(String refreshToken, String accessTokenToReturn)
public void addRefreshToken(String refreshToken, String accessTokenToReturn)
Parameters
addServiceAccount(String email, String accessToken)
public void addServiceAccount(String email, String accessToken)
Parameters
buildRequest(String method, String url)
public LowLevelHttpRequest buildRequest(String method, String url)
Parameters
Returns
Type | Description |
com.google.api.client.http.LowLevelHttpRequest | |
Overrides
com.google.api.client.testing.http.MockHttpTransport.buildRequest(java.lang.String,java.lang.String)
Exceptions
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-05-28 UTC.
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]