Stuart Heap
3 years ago
No known key found for this signature in database
GPG Key ID: C753450AB379AA25
1 changed files with
24 additions and
18 deletions
-
src/api/identity.rs
|
|
@ -632,7 +632,8 @@ fn _check_is_some<T>(value: &Option<T>, msg: &str) -> EmptyResult { |
|
|
|
#[allow(unreachable_code)] |
|
|
|
fn prevalidate(domainHint: String, conn: DbConn) -> JsonResult { |
|
|
|
let empty_result = json!({}); |
|
|
|
let organization = Organization::find_by_identifier(&domainHint, &conn).unwrap(); |
|
|
|
match Organization::find_by_identifier(&domainHint, &conn) { |
|
|
|
Some(organization) => { |
|
|
|
let sso_config = SsoConfig::find_by_org(&organization.uuid, &conn); |
|
|
|
match sso_config { |
|
|
|
Some(sso_config) => { |
|
|
@ -655,6 +656,11 @@ fn prevalidate(domainHint: String, conn: DbConn) -> JsonResult { |
|
|
|
} |
|
|
|
|
|
|
|
Ok(Json(empty_result)) |
|
|
|
}, |
|
|
|
None => { |
|
|
|
return err_code!("No matching organization found", Status::BadRequest.code); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
use openidconnect::core::{ |
|
|
|