服務器+的Xcode 8.1無法通過禁止
我想讀火力地堡實時數據庫的HTTP請求到我的DB斯威夫特+蒸汽框架HTTP/REST錯誤403訪問火力數據庫,但我得到許可被拒絕。
這些步驟如下:
1.創建智威湯遜與「console.developers.google.com」
2.發送POST請求到OAuth2服務器並獲得訪問令牌
3.發送下載的密鑰簽名使用從OAuth2服務器接收的訪問令牌向Firebase數據庫發出GET請求。
我收到拒絕 「權限」,HTTP/1.1 403禁止
// the header of the JSON Web Token (first part of the JWT)
let headerJWT = ["alg":"RS256","typ":"JWT"]
// the claim set of the JSON Web Token
let jwtClaimSet =
["iss":"[email protected]",
"scope":"https://www.googleapis.com/auth/firebase.database", //is this the correct API to access firebase database?
"aud":"https://www.googleapis.com/oauth2/v4/token",
"exp": expDate,
"iat": iatDate]
drop.get("access") { request in
var accesstoken = "ya29.ElqhA-....XXXX"
let responseFirebase = try drop.client.get("https://fir- 30c9e.firebaseio.com/data/Users.json",
headers: ["Authorization":"Bearer \(accesstoken)"],
query: [:])
print("FirebaseResponse_is \(responseFirebase)")
return "success"
}
@frank麪包車puffelen能否請你擺脫你的意見,爲什麼我不能進入我火力地堡數據庫? – bibscy