File tree Expand file tree Collapse file tree
oauth2_http/java/com/google/auth/oauth2 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -76,11 +76,8 @@ public class GdchCredentials extends GoogleCredentials {
7676 private static final String PARSE_ERROR_PREFIX = "Error parsing token refresh response. " ;
7777 @ VisibleForTesting static final String SUPPORTED_FORMAT_VERSION = "1" ;
7878
79- private static final String ACCESS_TOKEN_TYPE = "urn:ietf:params:oauth:token-type:access_token" ;
8079 private static final String SERVICE_ACCOUNT_TOKEN_TYPE =
8180 "urn:k8s:params:oauth:token-type:serviceaccount" ;
82- private static final String TOKEN_TYPE_TOKEN_EXCHANGE =
83- "urn:ietf:params:oauth:token-type:token-exchange" ;
8481
8582 private static final int DEFAULT_LIFETIME_IN_SECONDS = 3600 ;
8683
@@ -288,8 +285,8 @@ public AccessToken refreshAccessToken() throws IOException {
288285
289286 GenericData tokenRequest = new GenericData ();
290287 tokenRequest .set ("audience" , apiAudience );
291- tokenRequest .set ("grant_type" , TOKEN_TYPE_TOKEN_EXCHANGE );
292- tokenRequest .set ("requested_token_type" , ACCESS_TOKEN_TYPE );
288+ tokenRequest .set ("grant_type" , OAuth2Utils . TOKEN_TYPE_TOKEN_EXCHANGE );
289+ tokenRequest .set ("requested_token_type" , OAuth2Utils . TOKEN_TYPE_ACCESS_TOKEN );
293290 tokenRequest .set ("subject_token" , assertion );
294291 tokenRequest .set ("subject_token_type" , SERVICE_ACCOUNT_TOKEN_TYPE );
295292
You can’t perform that action at this time.
0 commit comments