-
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.
Added application.yml which contains default filter attributes as well as a placeholder for new custom attributes. Added CustomAttributesConfiguration and supporting code to allow for reading from the application.yml. Updated ModelRepresentationConversions to support multiple release attributes. Updated unit tests to attempt to fix the negative refresh delay issue. Again. Added spring-boot-configuration-processor to backend build to support @ConfigurationProperties.
- Loading branch information
Bill Smith
committed
Sep 18, 2018
1 parent
37e8347
commit 3b6de6b
Showing
11 changed files
with
106 additions
and
11 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
1 change: 1 addition & 0 deletions
1
backend/src/main/java/edu/internet2/tier/shibboleth/admin/ui/ShibbolethUiApplication.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
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.HashMap; | ||
import java.util.List; | ||
|
||
/** | ||
* @author Bill Smith (wsmith@unicon.net) | ||
*/ | ||
@Configuration | ||
@ConfigurationProperties(prefix="custom") | ||
public class CustomAttributesConfiguration { | ||
|
||
private List<HashMap<String, String>> attributes = new ArrayList<>(); | ||
|
||
public List<HashMap<String, String>> getAttributes() { | ||
return attributes; | ||
} | ||
|
||
public void setAttributes(List<HashMap<String, String>> attributes) { | ||
this.attributes = attributes; | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
custom: | ||
attributes: | ||
# Default attributes | ||
- name: eduPersonPrincipalName | ||
displayName: eduPersonPrincipalName (EPPN) | ||
- name: uid | ||
displayName: uid | ||
- name: mail | ||
displayName: mail | ||
- name: surname | ||
displayName: surname | ||
- name: givenName | ||
displayName: givenName | ||
- name: eduPersonAffiliation | ||
displayName: eduPersonAffiliation | ||
- name: eduPersonScopedAffiliation | ||
displayName: eduPersonScopedAffiliation | ||
- name: eduPersonPrimaryAffiliation | ||
displayName: eduPersonPrimaryAffiliation | ||
- name: eduPersonEntitlement | ||
displayName: eduPersonEntitlement | ||
- name: eduPersonAssurance | ||
displayName: eduPersonAssurance | ||
- name: eduPersonUniqueId | ||
displayName: eduPersonUniqueId | ||
- name: employeeNumber | ||
displayName: employeeNumber | ||
# Custom attributes |
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
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