Split login_via_existing_session conf item to login_via_token.
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
@@ -22,7 +22,7 @@ pub(super) async fn handle_login(
|
||||
) -> Result<OwnedUserId> {
|
||||
let Token { token } = info;
|
||||
|
||||
if !services.config.login_via_existing_session {
|
||||
if !services.config.login_via_token {
|
||||
return Err!(Request(Unknown("Token login is not enabled.")));
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ pub(crate) async fn login_token_route(
|
||||
InsecureClientIp(client): InsecureClientIp,
|
||||
body: Ruma<get_login_token::v1::Request>,
|
||||
) -> Result<get_login_token::v1::Response> {
|
||||
if !services.config.login_via_existing_session {
|
||||
if !services.config.login_via_existing_session || !services.config.login_via_token {
|
||||
return Err!(Request(Forbidden("Login via an existing session is not enabled")));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user