Use a string defined in idp.properties in the view attribute of a flow

shibboleth655 at lewenberg.com shibboleth655 at lewenberg.com
Sun Mar 11 10:14:06 EDT 2018


I am using the stock 
dist/flows/authn/conditions/expired-password/expired-password-flow.xml.dist 
to redirect to a password change page if the user's password expires.

I have altered it slightly to the following:

########################################################################
<flow...>
     <input name="calledAsSubflow" type="boolean" required="true" />


     <view-state id="ExpiredPassword" 
view="externalRedirect:https://www.example.com/password-change">
         <transition on="proceed" to="proceed" />
     </view-state>

     <end-state id="proceed" />
</flow>
########################################################################

This works.

However, I would like to change the above to something like this:
########################################################################
<flow ...>
     <input name="calledAsSubflow" type="boolean" required="true" />


     <view-state id="ExpiredPassword" 
view="externalRedirect:%{idp.intercept.password_change_url}">
         <transition on="proceed" to="proceed" />
     </view-state>

     <end-state id="proceed" />
</flow>
########################################################################

where I have in conf/idp.properties the line
########################################################################
idp.intercept.password_change_url = https://www.example.com/password-change
########################################################################

Needless to say, this does not work.


I next created the file expired-password-beans.xml:
########################################################################
  <beans ... >
    <bean 
class="org.springframework.context.support.PropertySourcesPlaceholderConfigurer"
         p:placeholderPrefix="%{" p:placeholderSuffix="}" />

     <bean id="shibboleth.xyz.abc" class="java.lang.String" 
c:_0="%{idp.intercept.password_change_url}" />

</beans>
########################################################################

and imported it into expired-password-flow.xml:
########################################################################
<flow ...>
     <input name="calledAsSubflow" type="boolean" required="true" />


     <view-state id="ExpiredPassword" view="#{ shibboleth.xyz.abc }">
         <transition on="proceed" to="proceed" />
     </view-state>

     <end-state id="proceed" />

     <bean-import resource="expired-password-beans.xml" />

</flow>
########################################################################

This gives me an error.

Clearly 'view="#{ shibboleth.xyz.abc }"' is not correct.

What _is_ the correct way to make the view attribute get the value 
defined by the bean "shibboleth.xyz.abc"?




More information about the users mailing list