[java-identity-provider COMMIT] in /trunk: idp-conf/src/main/resources/views/login.vm idp-ui/src/main/java/net/shibbo...

noreply at shibboleth.net noreply at shibboleth.net
Wed Aug 13 10:09:32 EDT 2014


Author: rdw
Date: Wed Aug 13 10:09:31 2014
New Revision: 6417

URL: http://svn.shibboleth.net/view/java-identity-provider?rev=6417&view=rev
Log:
IDP-245 Start to wire in the MDUI calls into the velocity template

Modified:
    trunk/idp-conf/src/main/resources/views/login.vm
    trunk/idp-ui/src/main/java/net/shibboleth/idp/ui/context/RelyingPartyUIContext.java
    trunk/idp-ui/src/main/java/net/shibboleth/idp/ui/context/SetRPUIInformation.java

Modified: trunk/idp-conf/src/main/resources/views/login.vm
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-conf/src/main/resources/views/login.vm?rev=6417&r1=6416&r2=6417&view=diff
==============================================================================
--- trunk/idp-conf/src/main/resources/views/login.vm (original)
+++ trunk/idp-conf/src/main/resources/views/login.vm Wed Aug 13 10:09:31 2014
@@ -4,6 +4,7 @@
 ## Velocity context will contain the following properties
 ## flowExecutionUrl - the form action location
 ## flowRequestContext - the Spring Web Flow RequestContext
+## rpUIContext - the context with information from the metadata
 ## flowExecutionKey - the SWF execution key (this is built into the flowExecutionUrl)
 ## encoder - HTMLEncoder class
 ## request - HttpServletRequest
@@ -43,7 +44,7 @@
               #end
 
               <legend>
-                <!-- Log in to TODO: SP UI info -->
+                 Log in to $rpUIContext.getServiceName("Anonymous Service");
               </legend>
 
               <section>
@@ -66,7 +67,24 @@
               </section>
             </form>
 
-			<!-- TODO: SP UI info -->            
+			<!-- 
+              //
+              //    SP Description & Logo (optional)
+              //    These idpui lines will display added information (if available
+              //    in the metadata) about the Service Provider (SP) that requested
+              //    authentication. These idpui lines are "active" in this example
+              //    (not commented out) -- this extra SP info will be displayed.
+              //    Remove or comment out these lines to stop the display of the
+              //    added SP information.
+              //
+              //    Documentation: 
+              //      https://wiki.shibboleth.net/confluence/display/SHIB2/IdPAuthUserPassLoginPage
+              //
+              //    Example:
+              $rpUIContext.getLogo();
+            -->
+			$rpUIContext.getServiceDescription("")
+			          
 
           </div>
           <div class="column two">

Modified: trunk/idp-ui/src/main/java/net/shibboleth/idp/ui/context/RelyingPartyUIContext.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-ui/src/main/java/net/shibboleth/idp/ui/context/RelyingPartyUIContext.java?rev=6417&r1=6416&r2=6417&view=diff
==============================================================================
--- trunk/idp-ui/src/main/java/net/shibboleth/idp/ui/context/RelyingPartyUIContext.java (original)
+++ trunk/idp-ui/src/main/java/net/shibboleth/idp/ui/context/RelyingPartyUIContext.java Wed Aug 13 10:09:31 2014
@@ -440,23 +440,18 @@
      */
     @Nullable public String getServiceDescription(@Nullable final String defaultValue) {
 
-        if (getRPEntityDescriptor() == null) {
-            log.debug("No relying party, no description, returning '{}'", defaultValue);
-            return defaultValue;
-        }
-
         for (final String lang : getBrowserLanguages()) {
-            for (final ServiceDescription desc : getRPAttributeConsumingService().getDescriptions()) {
-                log.trace("Found description in AttributeConsumingService, language '{}'", desc.getXMLLang());
-                if (desc.getXMLLang().equals(lang)) {
-                    log.debug("Language match, returning description from AttributeConsumingService '{}'",
-                            desc.getValue());
-                    return desc.getValue();
-                }
+            String value = getDescriptionFromUIInfo(lang);
+            if (null != value) {
+                return value;
+            }
+            value = getDescriptionFromAttributeConsumingService(lang);
+            if (null != value) {
+                return value;
             }
         }
         log.debug("No description matching the languages found, returning '{}'", defaultValue);
-        return getNameFromEntityId();
+        return defaultValue;
     }
 
     /**

Modified: trunk/idp-ui/src/main/java/net/shibboleth/idp/ui/context/SetRPUIInformation.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-ui/src/main/java/net/shibboleth/idp/ui/context/SetRPUIInformation.java?rev=6417&r1=6416&r2=6417&view=diff
==============================================================================
--- trunk/idp-ui/src/main/java/net/shibboleth/idp/ui/context/SetRPUIInformation.java (original)
+++ trunk/idp-ui/src/main/java/net/shibboleth/idp/ui/context/SetRPUIInformation.java Wed Aug 13 10:09:31 2014
@@ -32,10 +32,12 @@

[... 43 lines stripped ...]


More information about the commits mailing list