6969import java .time .temporal .ChronoUnit ;
7070import java .util .*;
7171import java .util .stream .Collectors ;
72+ import java .util .stream .Stream ;
7273
7374import static myconext .SwaggerOpenIdConfig .OPEN_ID_SCHEME_NAME ;
7475import static myconext .crypto .HashGenerator .hash ;
@@ -133,7 +134,7 @@ public UserController(UserRepository userRepository,
133134 CaptchaVerifier captchaVerifier ,
134135 @ Qualifier ("jsonMapper" ) ObjectMapper objectMapper ,
135136 @ Value ("${email.magic-link-url}" ) String magicLinkUrl ,
136- @ Value ("${schac_home_organization }" ) String schacHomeOrganization ,
137+ @ Value ("${schac_home_organizations }" ) String schacHomeOrganizations ,
137138 @ Value ("${email_guessing_sleep_millis}" ) int emailGuessingSleepMillis ,
138139 @ Value ("${sp_redirect_url}" ) String spBaseUrl ,
139140 @ Value ("${idp_redirect_url}" ) String idpBaseUrl ,
@@ -160,7 +161,7 @@ public UserController(UserRepository userRepository,
160161 this .objectMapper = objectMapper ;
161162 this .captchaVerifier = captchaVerifier ;
162163 this .magicLinkUrl = magicLinkUrl ;
163- this .schacHomeOrganization = schacHomeOrganization ;
164+ this .schacHomeOrganization = Stream . of ( schacHomeOrganizations . split ( "," )). map ( String :: trim ). toList (). getFirst () ;
164165 this .idpBaseUrl = idpBaseUrl ;
165166 this .spBaseUrl = spBaseUrl ;
166167 this .webAuthnSpRedirectUrl = String .format ("%s/security" , spBaseUrl );
0 commit comments