-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into SHIBUI-808
# Conflicts: # backend/build.gradle
- Loading branch information
Showing
175 changed files
with
3,324 additions
and
5,410 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
...a/edu/internet2/tier/shibboleth/admin/ui/configuration/CustomAttributesConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| package edu.internet2.tier.shibboleth.admin.ui.configuration; | ||
|
|
||
| import org.springframework.boot.context.properties.ConfigurationProperties; | ||
| import org.springframework.context.annotation.Configuration; | ||
|
|
||
| import java.util.ArrayList; | ||
| import java.util.List; | ||
| import java.util.Map; | ||
|
|
||
| /** | ||
| * @author Bill Smith (wsmith@unicon.net) | ||
| */ | ||
| @Configuration | ||
| @ConfigurationProperties(prefix="custom") | ||
| public class CustomAttributesConfiguration { | ||
|
|
||
| private List<? extends Map<String, String>> attributes = new ArrayList<>(); | ||
|
|
||
| public List<? extends Map<String, String>> getAttributes() { | ||
| return attributes; | ||
| } | ||
|
|
||
| public void setAttributes(List<? extends Map<String, String>> attributes) { | ||
| this.attributes = attributes; | ||
| } | ||
| } |
26 changes: 26 additions & 0 deletions
26
.../src/main/java/edu/internet2/tier/shibboleth/admin/ui/configuration/StringTrimModule.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| package edu.internet2.tier.shibboleth.admin.ui.configuration; | ||
|
|
||
| import com.fasterxml.jackson.core.JsonParser; | ||
| import com.fasterxml.jackson.databind.DeserializationContext; | ||
| import com.fasterxml.jackson.databind.deser.std.StdScalarDeserializer; | ||
| import com.fasterxml.jackson.databind.module.SimpleModule; | ||
|
|
||
| import java.io.IOException; | ||
|
|
||
| /** | ||
| * @author Bill Smith (wsmith@unicon.net) | ||
| * | ||
| * Adapted from Maciej Marczuk's answer on Stack Overflow here: | ||
| * https://stackoverflow.com/questions/6852213/can-jackson-be-configured-to-trim-leading-trailing-whitespace-from-all-string-pr/33765854#33765854 | ||
| */ | ||
| public class StringTrimModule extends SimpleModule { | ||
|
|
||
| public StringTrimModule() { | ||
| addDeserializer(String.class, new StdScalarDeserializer<String>(String.class) { | ||
| @Override | ||
| public String deserialize(JsonParser jsonParser, DeserializationContext ctx) throws IOException { | ||
| return jsonParser.getValueAsString().trim(); | ||
| } | ||
| }); | ||
| } | ||
| } |
24 changes: 24 additions & 0 deletions
24
.../main/java/edu/internet2/tier/shibboleth/admin/ui/controller/ConfigurationController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| package edu.internet2.tier.shibboleth.admin.ui.controller; | ||
|
|
||
| import edu.internet2.tier.shibboleth.admin.ui.configuration.CustomAttributesConfiguration; | ||
| import org.springframework.beans.factory.annotation.Autowired; | ||
| import org.springframework.http.ResponseEntity; | ||
| import org.springframework.stereotype.Controller; | ||
| import org.springframework.web.bind.annotation.GetMapping; | ||
| import org.springframework.web.bind.annotation.RequestMapping; | ||
|
|
||
| /** | ||
| * @author Bill Smith (wsmith@unicon.net) | ||
| */ | ||
| @Controller | ||
| @RequestMapping(value = "/api") | ||
| public class ConfigurationController { | ||
|
|
||
| @Autowired | ||
| CustomAttributesConfiguration customAttributesConfiguration; | ||
|
|
||
| @GetMapping(value = "/customAttributes") | ||
| public ResponseEntity<?> getCustomAttributes() { | ||
| return ResponseEntity.ok(customAttributesConfiguration.getAttributes()); | ||
| } | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| custom: | ||
| attributes: | ||
| # Default attributes | ||
| - name: eduPersonPrincipalName | ||
| displayName: label.attribute-eduPersonPrincipalName | ||
| - name: uid | ||
| displayName: label.attribute-uid | ||
| - name: mail | ||
| displayName: label.attribute-mail | ||
| - name: surname | ||
| displayName: label.attribute-surname | ||
| - name: givenName | ||
| displayName: label.attribute-givenName | ||
| - name: eduPersonAffiliation | ||
| displayName: label.attribute-eduPersonAffiliation | ||
| - name: eduPersonScopedAffiliation | ||
| displayName: label.attribute-eduPersonScopedAffiliation | ||
| - name: eduPersonPrimaryAffiliation | ||
| displayName: label.attribute-eduPersonPrimaryAffiliation | ||
| - name: eduPersonEntitlement | ||
| displayName: label.attribute-eduPersonEntitlement | ||
| - name: eduPersonAssurance | ||
| displayName: label.attribute-eduPersonAssurance | ||
| - name: eduPersonUniqueId | ||
| displayName: label.attribute-eduPersonUniqueId | ||
| - name: employeeNumber | ||
| displayName: label.attribute-employeeNumber | ||
| # Custom attributes |
Oops, something went wrong.