Places api uses client id (enterprise credentials) instead of apikey when both are configured
還沒有人認領這個 Issue。
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 38/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 停滯
- 技術堆疊
- java
- 領域
- api, authentication
研究方向
首先追蹤從同時設定了 apiKey 和 enterpriseCredentials 的 GeoContext 建構 PlacesApi 請求的過程,重點關注報告中提到的 canuseclient 設定。使用已設定的兩組認證重現一次 Places autocomplete 呼叫,並確認完成的請求使用的是 API key,而不是 client 和 signature 參數。
由索引模型根據 Issue 內容生成。
描述
Hello,
We have an application that uses the Google API for PlacesAPI, TimeZoneApi and GeoCodingAPI.
Now we have a GeoContext spring bean defined where we set the API key and the Enterprise credentials. Which we inject in our service to use for the calls to the api's
// Config class
builder.apiKey(googleApiKey);
builder.enterpriseCredentials(googleClientId, googleCryptoKey);
builder.channel(googleChannel);
// Call in the service
PlaceAutocompleteRequest request = PlacesApi.placeAutocomplete(context, query, googleSesionKey).language("en").await();
Whenever we do a call to the placesAPI then it builds the url like below with the client and signature instead of the apiKey
this gives us back an error stating that an api key must be provided.
During debugging of the placesApi I notice that it adds this clientid instead of APIKey when it is provided and because of a setting canuseclient is set to true.
Is this a bug that the placesapi config is wrong as it should not seem to use this clientid? I am also not sure where this can be modified to false.
Thanks
- 主要語言
- Java
- 星號
- 1.8k
- 分支
- 972
- 平均合併
- 5 小時 7 分鐘
- 30 天內合併 PR
- 1
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
googlemaps/google-maps-services-java 的其他 Issue
-
PlacesApi.placeDetails(context, placeId).await() interface error可能已有人在做 @madtriceps 於 99 天前認領。 未關閉triage me type: bug
難度 3/5 1-2 天 新手友好度 48/100
-
triage me type: feature request
難度 5/5 一週以上 新手友好度 10/100
-
Bagg hacm未關閉
難度 5/5 一週以上 新手友好度 5/100
googlemaps/google-maps-services-java#1059 · 1 個 reaction ·
-
Issue in java da未關閉
難度 5/5 一週以上 新手友好度 10/100
-
Issue in java da未關閉
難度 5/5 一週以上 新手友好度 10/100
查看 googlemaps/google-maps-services-java 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 65/100
logisim-evolution/logisim-evolution#3192 · 1 則留言 ·
維護者通常 2 天內回覆
-
Area-UIUX Issue-Bug Issue-Easy (good first issue)
難度 2/5 1-3 小時 新手友好度 67/100
TeamAmaze/AmazeFileManager#4769 ·
維護者通常 7 天內回覆
-
難度 2/5 1-3 小時 新手友好度 68/100
open-feature/java-sdk#2076 ·
維護者通常 1 天內回覆
-
Expose SManga.memo & SChapter.memo fields in GraphQL APIs to support source-specific client features未關閉enhancement
難度 2/5 1-3 小時 新手友好度 72/100
Suwayomi/Suwayomi-Server#2551 ·
維護者通常 9 天內回覆
-
WebSocketClientExtensionHandler does not release the handshake response when it rejects an extension未關閉
難度 2/5 1-3 小時 新手友好度 75/100
維護者通常 1 天內回覆