[java-identity-provider COMMIT] in /trunk: idp-conf/src/main/resources/conf/intercept/consent-intercept-config.xml id...
noreply at shibboleth.net
noreply at shibboleth.net
Sun Nov 23 23:37:30 EST 2014
Author: scantor
Date: Sun Nov 23 23:37:30 2014
New Revision: 6997
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=6997&view=rev
Log:
- Enhance TOU flow to support mutliple TOU terms using indirection.
- Fix consent-needed predicate to skip consent only if no current consents populated
Modified:
trunk/idp-conf/src/main/resources/conf/intercept/consent-intercept-config.xml
trunk/idp-conf/src/main/resources/messages/consent-messages.properties
trunk/idp-conf/src/main/resources/system/flows/intercept/terms-of-use-beans.xml
trunk/idp-conf/src/main/resources/system/flows/intercept/terms-of-use-flow.xml
trunk/idp-conf/src/main/resources/views/intercept/terms-of-use.vm
trunk/idp-consent/src/main/java/net/shibboleth/idp/consent/flow/PopulateConsentContext.java
trunk/idp-consent/src/main/java/net/shibboleth/idp/consent/logic/IsConsentRequiredPredicate.java
trunk/idp-consent/src/main/java/net/shibboleth/idp/consent/logic/MessageSourceConsentFunction.java
trunk/idp-consent/src/test/java/net/shibboleth/idp/consent/logic/IsConsentRequiredPredicateTest.java
trunk/idp-consent/src/test/java/net/shibboleth/idp/consent/logic/MessageSourceConsentFunctionTest.java
trunk/idp-profile-api/src/main/java/net/shibboleth/idp/profile/context/navigate/ScriptedContextLookupFunction.java
Modified: trunk/idp-conf/src/main/resources/conf/intercept/consent-intercept-config.xml
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-conf/src/main/resources/conf/intercept/consent-intercept-config.xml?rev=6997&r1=6996&r2=6997&view=diff
==============================================================================
--- trunk/idp-conf/src/main/resources/conf/intercept/consent-intercept-config.xml (original)
+++ trunk/idp-conf/src/main/resources/conf/intercept/consent-intercept-config.xml Sun Nov 23 23:37:30 2014
@@ -12,9 +12,36 @@
default-init-method="initialize"
default-destroy-method="destroy">
- <!-- TODO: make this a map? -->
- <bean id="shibboleth.consent.terms-of-use.ConsentID" class="java.lang.String" c:_0="idp.terms-of-use.id" />
- <bean id="shibboleth.consent.terms-of-use.ConsentValue" class="java.lang.String" c:_0="idp.terms-of-use.text" />
+ <!-- Terms of Use configuration -->
+
+ <!--
+ Terms of use is driven by a lookup function returning a key into messages/consent-message.properties
+
+ The default mapping returns the relying party / SP name as the key. The second example below
+ demonstrates use of a custom mapping table from the relying party name to the key to use.
+ -->
+
+ <alias alias="shibboleth.consent.terms-of-use.Key" name="shibboleth.RelyingPartyIdLookup.Simple" />
+
+ <!--
+ <bean id="shibboleth.consent.terms-of-use.Key"
+ class="com.google.common.base.Functions" factory-method="compose">
+ <constructor-arg name="g">
+ <bean class="com.google.common.base.Functions" factory-method="forMap" c:defaultValue="terms-of-use">
+ <constructor-arg name="map">
+ <map>
+ <entry key="https://sp.example.org/shibboleth" value="example-terms" />
+ </map>
+ </constructor-arg>
+ </bean>
+ </constructor-arg>
+ <constructor-arg name="f">
+ <ref bean="shibboleth.RelyingPartyIdLookup.Simple" />
+ </constructor-arg>
+ </bean>
+ -->
+
+ <!-- Attribute Release configuration -->
<!--
Attribute release whitelist, blacklist, and match expressions to determine
Modified: trunk/idp-conf/src/main/resources/messages/consent-messages.properties
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-conf/src/main/resources/messages/consent-messages.properties?rev=6997&r1=6996&r2=6997&view=diff
==============================================================================
--- trunk/idp-conf/src/main/resources/messages/consent-messages.properties (original)
+++ trunk/idp-conf/src/main/resources/messages/consent-messages.properties Sun Nov 23 23:37:30 2014
@@ -1,18 +1,16 @@
-# Messages related to terms of use consent.
-
-idp.terms-of-use.title = Terms of Use
+# General messages related to terms of use consent.
idp.terms-of-use.accept = I accept the terms of use
-
idp.terms-of-use.submit = Submit
-
idp.terms-of-use.reject = Refuse
-
idp.terms-of-use.required = Please check this box if you want to proceed.
-idp.terms-of-use.id = Terms of Use 1.0
+# Triples consisting of a TOU key, and a title and text for each set of terms.
+# The default implementation uses the SP name as the key, but this can be overriden.
-idp.terms-of-use.text = <em>*** This is an example ToU - tailor due to your needs ***</em> \
+https\://sp.example.org = example-tou-1
+example-tou-1.title = Example Terms of Use
+example-tou-1.text = <em>*** This is an example ToU - tailor due to your needs ***</em> \
<p>Example organization AAI services: Terms of Use (ToU)</p> \
[... 716 lines stripped ...]
More information about the commits
mailing list