File tree Expand file tree Collapse file tree
src/main/java/eu/openanalytics/containerproxy/auth/impl/oidc Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ public class OpenIDConfiguration {
5454 public static final String REG_ID = "shinyproxy" ;
5555 public static final String PROP_OPENID_JWKS_SIGNATURE_ALGORITHM = "proxy.openid.jwks-signature-algorithm" ;
5656 public static final String PROP_DEFAULT_ALGORITHM = "RS256" ;
57+ public static final String PROP_INCLUDE_DEFAULT_SCOPES = "proxy.openid.include-default-scopes" ;
5758
5859 @ Inject
5960 private Environment environment ;
@@ -69,8 +70,10 @@ public OAuth2AuthorizedClientService oAuth2AuthorizedClientService() {
6970 @ Bean
7071 public ClientRegistrationRepository clientRegistrationRepository () {
7172 Set <String > scopes = new HashSet <>();
72- scopes .add ("openid" );
73- scopes .add ("email" );
73+ if (environment .getProperty (PROP_INCLUDE_DEFAULT_SCOPES , Boolean .class , true )) {
74+ scopes .add ("openid" );
75+ scopes .add ("email" );
76+ }
7477
7578 Optional .ofNullable (EnvironmentUtils .readList (environment , "proxy.openid.scopes" ))
7679 .ifPresent (scopes ::addAll );
You can’t perform that action at this time.
0 commit comments