2016-12-06 4 views
2

私のプロジェクトにOEuth2をAppEngine Backendと統合する必要があります。 AppEngineでfirebase Authを使用してセキュリティを確保する予定です。 チュートリアル使用:https://cloud.google.com/endpoints/docs/authenticating-users#configuring_extensible_service_proxy_to_support_client_authenticationExtensible Service Proxyの設定ファイルを編集するには

Extensible Service Proxyの設定ファイルはどこですか?どのように編集するのですか?

答えて

0

あなたはopenapi.yaml(旧swagger.yaml)にこの設定を追加する必要があります。

swagger: '2.0' 
info: 
    version: 1.0.0 
    title: "My Endpoints" 
host: my-backend-api.YOUR-PROJECT-ID.appspot.com 
basePath: "/_ah/api" 
schemes: 
- "https" 
consumes: 
- "application/json" 
produces: 
- "application/json" 
paths: 
    /testAPI/v1/echo: 
     get: 
      operationId: TestAPIEcho 
      responses: 
       200: 
        description: A successful response 
        schema: 
         $ref: "#/definitions/echoMessage" 
      parameters: 
      - name: message 
       in: query 
       required: true 
       type: string 
      x-security: 
      - firebase 

definitions: 
    echoMessage: 
     properties: 
      message: 
       type: "string" 

security: 
- api_key: [] 

securityDefinitions: 
    firebase: 
     flow: "implicit" 
     type: "oauth2" 
     # Replace YOUR-PROJECT-ID with your project ID 
     x-issuer: "https://securetoken.google.com/YOUR-PROJECT-ID" 
     x-jwks_uri: "https://www.googleapis.com/service_accounts/v1/metadata/x509/[email protected]" 
1

私はこの質問には同じものを探していました。私は、クラウドエンドポイントv2とGAEを使用しています。私のバックエンドはPythonです。私にとって

は、2017年6月に、それは、[yournameandversion]openapi.jsonyamlファイルではありませんが、あなたはthis tutorial

+0

コメントが削除従うとき、それは自動的に含まれています。指摘してくれてありがとう。 – nop77svk

関連する問題