服务器+的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