This repository was archived by the owner on Aug 10, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +13
-4
lines changed
Expand file tree Collapse file tree 3 files changed +13
-4
lines changed Original file line number Diff line number Diff line change 66 <groupId >ee.ria.tara</groupId >
77 <artifactId >tara-server</artifactId >
88 <packaging >war</packaging >
9- <version >1.4.12 </version >
9+ <version >1.4.13 </version >
1010
1111 <properties >
1212 <cas .version>5.3.9</cas .version>
Original file line number Diff line number Diff line change @@ -161,7 +161,7 @@ public class TaraOidcConfiguration {
161161 @ Qualifier ("consentApprovalViewResolver" )
162162 private ConsentApprovalViewResolver consentApprovalViewResolver ;
163163
164- @ Autowired
164+ @ Autowired ( required = false )
165165 private EidasConfigurationProvider eidasConfigurationProvider ;
166166
167167 @ Bean
@@ -278,8 +278,12 @@ private ExpirationPolicy oAuthCodeExpirationPolicy() {
278278 }
279279
280280 private List <String > determineSupportedScopes (List <String > oidcScopes ) {
281- return Stream .of (oidcScopes , eidasConfigurationProvider . getAllowedEidasCountryScopeAttributes ())
281+ return Stream .of (oidcScopes , getAllowedEidasCountryScopeAttributes ())
282282 .flatMap (Collection ::stream )
283283 .collect (Collectors .collectingAndThen (Collectors .toList (), Collections ::unmodifiableList ));
284284 }
285+
286+ private List <String > getAllowedEidasCountryScopeAttributes () {
287+ return eidasConfigurationProvider == null ? Collections .emptyList () : eidasConfigurationProvider .getAllowedEidasCountryScopeAttributes ();
288+ }
285289}
Original file line number Diff line number Diff line change 3434public class OidcAuthorizeRequestValidationServletFilter implements Filter {
3535
3636 private final OidcAuthorizeRequestValidator oidcAuthorizeRequestValidator ;
37+
38+
3739 private final EidasConfigurationProvider eidasConfigurationProvider ;
3840
3941 @ Override
@@ -90,7 +92,10 @@ private void saveOidcRequestParametersToSession(final HttpServletRequest request
9092 String [] scopeElements = getScopeElements (request );
9193 List <TaraScope > scopes = parseScopes (scopeElements );
9294 session .setAttribute (Constants .TARA_OIDC_SESSION_SCOPES , scopes );
93- session .setAttribute (Constants .TARA_OIDC_SESSION_SCOPE_EIDAS_COUNTRY , parseScopeEidasCountry (scopeElements ).orElse (null ));
95+
96+ if (eidasConfigurationProvider != null ) {
97+ session .setAttribute (Constants .TARA_OIDC_SESSION_SCOPE_EIDAS_COUNTRY , parseScopeEidasCountry (scopeElements ).orElse (null ));
98+ }
9499
95100 session .setAttribute (Constants .TARA_OIDC_SESSION_CLIENT_ID ,
96101 request .getParameter (OidcAuthorizeRequestParameter .CLIENT_ID .getParameterKey ())
You can’t perform that action at this time.
0 commit comments