Merge pull request #19484 from yang-g/oauth

Update oauth2 token endpoints
pull/18410/head
Yang Gao 5 years ago committed by GitHub
commit a0e76c0300
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      src/core/lib/security/credentials/credentials.h
  2. 2
      src/core/lib/security/credentials/jwt/json_token.h
  3. 4
      test/core/security/jwt_verifier_test.cc

@ -64,8 +64,8 @@ typedef enum {
#define GRPC_COMPUTE_ENGINE_METADATA_TOKEN_PATH \
"/computeMetadata/v1/instance/service-accounts/default/token"
#define GRPC_GOOGLE_OAUTH2_SERVICE_HOST "www.googleapis.com"
#define GRPC_GOOGLE_OAUTH2_SERVICE_TOKEN_PATH "/oauth2/v3/token"
#define GRPC_GOOGLE_OAUTH2_SERVICE_HOST "oauth2.googleapis.com"
#define GRPC_GOOGLE_OAUTH2_SERVICE_TOKEN_PATH "/token"
#define GRPC_SERVICE_ACCOUNT_POST_BODY_PREFIX \
"grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Ajwt-bearer&" \

@ -30,7 +30,7 @@
/* --- Constants. --- */
#define GRPC_JWT_OAUTH2_AUDIENCE "https://www.googleapis.com/oauth2/v3/token"
#define GRPC_JWT_OAUTH2_AUDIENCE "https://oauth2.googleapis.com/token"
/* --- auth_json_key parsing. --- */

@ -128,9 +128,9 @@ static const char good_openid_config[] =
" \"issuer\": \"https://accounts.google.com\","
" \"authorization_endpoint\": "
"\"https://accounts.google.com/o/oauth2/v2/auth\","
" \"token_endpoint\": \"https://www.googleapis.com/oauth2/v4/token\","
" \"token_endpoint\": \"https://oauth2.googleapis.com/token\","
" \"userinfo_endpoint\": \"https://www.googleapis.com/oauth2/v3/userinfo\","
" \"revocation_endpoint\": \"https://accounts.google.com/o/oauth2/revoke\","
" \"revocation_endpoint\": \"https://oauth2.googleapis.com/revoke\","
" \"jwks_uri\": \"https://www.googleapis.com/oauth2/v3/certs\""
"}";

Loading…
Cancel
Save