Add a new property for authorities mapper

egi-login-service
parent c56595421f
commit 091b8d1290

@ -10,6 +10,7 @@ public class Properties {
private String domain;
private String session;
private String redirect;
private String authoritiesMapper;
public Properties() {
}
@ -53,4 +54,12 @@ public class Properties {
public void setRedirect(String redirect) {
this.redirect = redirect;
}
public String getAuthoritiesMapper() {
return authoritiesMapper;
}
public void setAuthoritiesMapper(String authoritiesMapper) {
this.authoritiesMapper = authoritiesMapper;
}
}

@ -43,7 +43,9 @@ public class Primitives {
@Bean
public OIDCAuthenticationProvider provider() {
OIDCAuthenticationProvider provider = new OIDCAuthenticationProvider();
provider.setAuthoritiesMapper(authoritiesMapper);
if(this.properties.getAuthoritiesMapper() != null && this.properties.getAuthoritiesMapper().equals("openAIREMapper")) {
provider.setAuthoritiesMapper(this.authoritiesMapper);
}
return provider;
}

@ -6,4 +6,5 @@ authentication.oidc.scope=openid,profile,email,eduperson_entitlement
authentication.oidc.id=id
authentication.oidc.secret=secret
authentication.session=openAIRESession
authentication.redirect=http://mpagasas.di.uoa.gr:4600/reload
authentication.redirect=http://mpagasas.di.uoa.gr:4600/reload
authentication.authorities-mapper=openAIREMapper # Currently this is the only available mapper, set to null or anything else will ignore this.
Loading…
Cancel
Save