[java-identity-provider] branch master updated: IDP-1126 - Validation and testing features focused on new deployers
Scott Cantor
cantor.2 at osu.edu
Mon Jun 22 23:01:43 UTC 2020
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch master
in repository java-identity-provider.
View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=44897700f1ce08b8115c4e40b984166345914012
The following commit(s) were added to refs/heads/master by this push:
new 44897700f IDP-1126 - Validation and testing features focused on new deployers
44897700f is described below
commit 44897700f1ce08b8115c4e40b984166345914012
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Mon Jun 22 19:01:27 2020 -0400
IDP-1126 - Validation and testing features focused on new deployers
https://issues.shibboleth.net/jira/browse/IDP-1126
Add attribute dump to hello world flow.
---
.../src/main/resources/conf/admin/general-admin.xml | 1 +
.../main/resources/system/flows/admin/hello-flow.xml | 1 +
idp-conf/src/main/resources/views/admin/hello.vm | 17 +++++++++++++++--
3 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/idp-conf/src/main/resources/conf/admin/general-admin.xml b/idp-conf/src/main/resources/conf/admin/general-admin.xml
index cdb4110a9..7eb146f50 100644
--- a/idp-conf/src/main/resources/conf/admin/general-admin.xml
+++ b/idp-conf/src/main/resources/conf/admin/general-admin.xml
@@ -53,6 +53,7 @@
c:id="http://shibboleth.net/ns/profiles/hello"
p:loggingId="Hello"
p:authenticated="true"
+ p:resolveAttributes="true"
p:policyName="AccessByAdminUser" />
<!-- REST AccountLockoutManager Access -->
diff --git a/idp-conf/src/main/resources/system/flows/admin/hello-flow.xml b/idp-conf/src/main/resources/system/flows/admin/hello-flow.xml
index 4fec0671b..25a66f95e 100644
--- a/idp-conf/src/main/resources/system/flows/admin/hello-flow.xml
+++ b/idp-conf/src/main/resources/system/flows/admin/hello-flow.xml
@@ -32,6 +32,7 @@
<evaluate expression="environment" result="requestScope.environment" />
<evaluate expression="opensamlProfileRequestContext" result="requestScope.profileRequestContext" />
<evaluate expression="opensamlProfileRequestContext.getSubcontext(T(net.shibboleth.idp.authn.context.SubjectContext))" result="requestScope.subjectContext" />
+ <evaluate expression="opensamlProfileRequestContext.getSubcontext(T(net.shibboleth.idp.profile.context.RelyingPartyContext)).getSubcontext(T(net.shibboleth.idp.attribute.context.AttributeContext))" result="requestScope.attributeContext" />
<evaluate expression="T(net.shibboleth.utilities.java.support.codec.HTMLEncoder)" result="requestScope.encoder" />
<evaluate expression="flowRequestContext.getExternalContext().getNativeRequest()" result="requestScope.request" />
<evaluate expression="flowRequestContext.getExternalContext().getNativeResponse()" result="requestScope.response" />
diff --git a/idp-conf/src/main/resources/views/admin/hello.vm b/idp-conf/src/main/resources/views/admin/hello.vm
index c2898f37d..e63dbfd12 100644
--- a/idp-conf/src/main/resources/views/admin/hello.vm
+++ b/idp-conf/src/main/resources/views/admin/hello.vm
@@ -8,6 +8,7 @@
## response - HttpServletResponse
## profileRequestContext - root of context tree
## subjectContext - ProfileRequestContext -> SubjectContext
+## attributeContext - ProfileRequestContext -> AttributeContext
## environment - Spring Environment object for property resolution
## custom - arbitrary object injected by deployer
##
@@ -29,8 +30,20 @@
</header>
<div class="content">
- <p>#springMessageText("hello-world.greeting", "Greetings"), $encoder.encodeForHTML($subjectContext.getPrincipalName())</p>
-
+ <h4>#springMessageText("hello-world.greeting", "Greetings"), <em>$encoder.encodeForHTML($subjectContext.getPrincipalName())</em></h4>
+ #if ($attributeContext && !$attributeContext.getUnfilteredIdPAttributes().isEmpty())
+ <br/>
+ <h4>Attributes:</h4>
+ #foreach ($a in $attributeContext.getUnfilteredIdPAttributes())
+ #if (!$a.getValues().isEmpty())
+ <br/>
+ <h5>$encoder.encodeForHTML($a.getId())</h5>
+ #foreach ($v in $a.getValues())
+ <blockquote>$encoder.encodeForHTML($v.getDisplayValue())</blockquote>
+ #end
+ #end
+ #end
+ #end
</div>
<header>
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list