server/rest: accept also = as token separator
Like we do in Proxmox VE Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
6d8a1ac9e4
commit
625a56b75e
@ -569,8 +569,12 @@ fn extract_auth_data(headers: &http::HeaderMap) -> Option<AuthData> {
|
||||
}
|
||||
|
||||
match headers.get(header::AUTHORIZATION).map(|v| v.to_str()) {
|
||||
Some(Ok(v)) if v.starts_with("PBSAPIToken ") => {
|
||||
Some(Ok(v)) => {
|
||||
if v.starts_with("PBSAPIToken ") || v.starts_with("PBSAPIToken=") {
|
||||
Some(AuthData::ApiToken(v["PBSAPIToken ".len()..].to_owned()))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
},
|
||||
_ => None,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user