Skip to content

Commit 2f8bc14

Browse files
committed
Update openApi config to use "security" instead of "x-security".
1 parent 9179959 commit 2f8bc14

File tree

1 file changed

+16
-17
lines changed

1 file changed

+16
-17
lines changed

endpoints/getting-started/openapi.yaml

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ paths:
3232
required: true
3333
schema:
3434
$ref: "#/definitions/echoMessage"
35+
security:
36+
- api_key: []
3537
"/auth/info/googlejwt":
3638
get:
3739
description: "Returns the requests' authentication information."
@@ -43,12 +45,9 @@ paths:
4345
description: "Authenication info."
4446
schema:
4547
$ref: "#/definitions/authInfoResponse"
46-
x-security:
47-
- google_jwt:
48-
audiences:
49-
# This must match the "aud" field in the JWT. You can add multiple
50-
# audiences to accept JWTs from multiple clients.
51-
- "echo.endpoints.sample.google.com"
48+
security:
49+
- api_key: []
50+
- google_jwt: []
5251
"/auth/info/googleidtoken":
5352
get:
5453
description: "Returns the requests' authentication information."
@@ -60,12 +59,9 @@ paths:
6059
description: "Authenication info."
6160
schema:
6261
$ref: "#/definitions/authInfoResponse"
63-
x-security:
64-
- google_id_token:
65-
audiences:
66-
# Your OAuth2 client's Client ID must be added here. You can add
67-
# multiple client IDs to accept tokens from multiple clients.
68-
- "YOUR-CLIENT-ID"
62+
security:
63+
- api_key: []
64+
- google_id_token: []
6965
definitions:
7066
echoMessage:
7167
properties:
@@ -77,9 +73,6 @@ definitions:
7773
type: "string"
7874
email:
7975
type: "string"
80-
# This section requires all requests to any path to require an API key.
81-
security:
82-
- api_key: []
8376
securityDefinitions:
8477
# This section configures basic authentication with an API key.
8578
api_key:
@@ -97,12 +90,18 @@ securityDefinitions:
9790
x-google-issuer: "jwt-client.endpoints.sample.google.com"
9891
# Update this with your service account's email address.
9992
x-google-jwks_uri: "https://www.googleapis.com/service_accounts/v1/jwk/YOUR-SERVICE-ACCOUNT-EMAIL"
93+
# This must match the "aud" field in the JWT. You can add multiple
94+
# audiences to accept JWTs from multiple clients.
95+
x-google-audiences: "echo.endpoints.sample.google.com"
10096
# This section configures authentication using Google OAuth2 ID Tokens.
10197
# ID Tokens can be obtained using OAuth2 clients, and can be used to access
10298
# your API on behalf of a particular user.
10399
google_id_token:
104100
authorizationUrl: ""
105101
flow: "implicit"
106102
type: "oauth2"
107-
x-google-issuer: "accounts.google.com"
108-
x-google-jwks_uri: "https://www.googleapis.com/oauth2/v1/certs"
103+
x-google-issuer: "https://accounts.google.com"
104+
x-google-jwks_uri: "https://www.googleapis.com/oauth2/v3/certs"
105+
# Your OAuth2 client's Client ID must be added here. You can add
106+
# multiple client IDs to accept tokens from multiple clients.
107+
x-google-audiences: "YOUR-CLIENT-ID"

0 commit comments

Comments
 (0)