Interface Credential.AccessMethod

    • Method Detail

      • intercept

        void intercept​(com.google.api.client.http.HttpRequest request,
                       String accessToken)
                throws IOException
        Intercept the HTTP request during Credential.intercept(HttpRequest) right before the HTTP request executes by providing the access token.
        Parameters:
        request - HTTP request
        accessToken - access token
        Throws:
        IOException
      • getAccessTokenFromRequest

        String getAccessTokenFromRequest​(com.google.api.client.http.HttpRequest request)
        Retrieve the original access token in the HTTP request, as provided in intercept(HttpRequest, String).
        Parameters:
        request - HTTP request
        Returns:
        original access token or null for none