migration-tool: Extract the JWT from the JSON response
The response used to contain just the JWT, but now it's wrapped in JSON. Fixes #282.
This commit is contained in:
committed by
nitnelave
parent
122e08790f
commit
7707367c35
@@ -174,7 +174,9 @@ fn try_login(
|
||||
response.status().as_str()
|
||||
);
|
||||
}
|
||||
Ok(response.text()?)
|
||||
let json = serde_json::from_str::<lldap_auth::login::ServerLoginResponse>(&response.text()?)
|
||||
.context("Could not parse response")?;
|
||||
Ok(json.token)
|
||||
}
|
||||
|
||||
pub fn get_lldap_user_and_password(
|
||||
|
||||
Reference in New Issue
Block a user