Thanks for stopping by to let us know something could be better!
PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.
Please run down the following list and make sure you've tried the usual "quick fixes":
If you are still having issues, please include as much information as possible:
subject_token_field_name is only valid for CredentialFormatType.JSON, but is also run on CredentialFormatType.TEXT which cause it to throw the exception:
|
credentialFormatType = |
|
type.equals("text") ? CredentialFormatType.TEXT : CredentialFormatType.JSON; |
|
|
|
if (!formatMap.containsKey("subject_token_field_name")) { |
|
throw new IllegalArgumentException( |
|
"When specifying a JSON credential type, the subject_token_field_name must be set."); |
|
} |
|
subjectTokenFieldName = formatMap.get("subject_token_field_name"); |
In the Python SDK, this line is if-checked to run only with JSON:
https://github.com/googleapis/google-auth-library-python/blob/3c3fbf40b07e090f2be7fac5b304dbf438b5cd6c/google/auth/identity_pool.py#L158-L165
Stack trace
java.lang.IllegalArgumentException","message":"When specifying a JSON credential type, the subject_token_field_name must be set.","stacktrace":"java.lang.IllegalArgumentException: When specifying a JSON credential type, the subject_token_field_name must be set.\n\tat com.google.auth.oauth2.IdentityPoolCredentials$IdentityPoolCredentialSource.<init>(IdentityPoolCredentials.java:144)\n\tat com.google.auth.oauth2.ExternalAccountCredentials.fromJson(ExternalAccountCredentials.java:319)\n\tat com.google.auth.oauth2.GoogleCredentials.fromStream(GoogleCredentials.java:170)\n\tat com.google.auth.oauth2.DefaultCredentialsProvider.getDefaultCredentialsUnsynchronized(DefaultCredentialsProvider.java:159)\n\tat com.google.auth.oauth2.DefaultCredentialsProvider.getDefaultCredentials(DefaultCredentialsProvider.java
Thanks for stopping by to let us know something could be better!
PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.
Please run down the following list and make sure you've tried the usual "quick fixes":
If you are still having issues, please include as much information as possible:
subject_token_field_name is only valid for
CredentialFormatType.JSON, but is also run onCredentialFormatType.TEXTwhich cause it to throw the exception:google-auth-library-java/oauth2_http/java/com/google/auth/oauth2/IdentityPoolCredentials.java
Lines 139 to 146 in 5688837
In the Python SDK, this line is if-checked to run only with JSON:
https://github.com/googleapis/google-auth-library-python/blob/3c3fbf40b07e090f2be7fac5b304dbf438b5cd6c/google/auth/identity_pool.py#L158-L165
Stack trace