change auth token header!
Google api docs LIED!
This commit is contained in:
@@ -17,12 +17,13 @@ fn get_live_id(channel: String) -> String {
|
||||
}
|
||||
|
||||
pub fn auth_header(mut req: Request<()>) -> Result<Request<()>, Status> {
|
||||
let token: MetadataValue<_> = "Bearer my-secret-token"
|
||||
let oauth_token = "Yeah!".to_string();
|
||||
let token: MetadataValue<_> = format!("Bearer {}", oauth_token)
|
||||
.parse()
|
||||
.expect("failed to parse token");
|
||||
|
||||
req.metadata_mut()
|
||||
.insert("x-goog-api-key", token)
|
||||
.insert("authorization", token)
|
||||
.expect("WHAT");
|
||||
Ok(req)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user