Hi All,

I'm trying to add a user policy acceptance process into the cas server. USing a 
similar process as 
[https://wiki.jasig.org/display/CASUM/Acceptable+Use+interface+for+Login+Webflow].But
 copying the Password Warning Exmaple Action as the Code for the Acceptable use 
wasn't attached.

I've got the whole process working except i now need to grab the current 
RegisteredServiceImpl ID so i can use it to find what policy i should display.

I notice :

SimpleWebApplicationServiceImpl service = (SimpleWebApplicationServiceImpl) 
context.getFlowScope().get("service");
this.logger.debug("serviceId='" + service.getId() + "'");

Gets me real service url.

Is there any existing way to match this against the RegisteredServiceImpl. Or 
will i need to do the search my self?


Regards
James.


LOGON-WEBFLOW.xml:

<action-state id="realSubmit">
        <evaluate 
expression="authenticationViaFormAction.submit(flowRequestContext, 
flowScope.credentials, messageContext)" />
                <transition on="warn" to="warn" />
                <transition on="success" to="UserPolicyWarningCheck" />
                <transition on="error" to="viewLoginForm" />
                <transition on="showExpiredPassView" to="showExpiredPassView" />
            <transition on="showAccountLockedView" to="showAccountLockedView" />
            <transition on="showAccountDisabledView" 
to="showAccountDisabledView" /> 
        </action-state>
        
        <!-- User Policy Warning Checker Starts HERE -->
        <action-state id="UserPolicyWarningCheck">
                <evaluate expression="UserPolicyWarningCheckAction" />
                <transition on="success" to="sendTicketGrantingTicket" />
                <transition on="showUserPolicy" to="showUserPolicy" />
                <transition on="error" to="viewLoginForm" />
        </action-state>
        
        <view-state id="showUserPolicy" view="casShowUserPolicy">
                <on-entry>
                        <set name="viewScope.commandName" value="'IntData'" />
                        <set name="viewScope.secondTime" 
value="flowScope.secondTime" />
                </on-entry>
                <transition on="submit" to="UserPolicyWarningSet" />
        </view-state>
        
        <action-state id="UserPolicyWarningSet">
                <evaluate expression="UserPolicyWarningSetAction" />
                <transition on="success" to="realSubmit" />
                <transition to="showUserPolicy"/>
        </action-state>



-- 
You are currently subscribed to [email protected] as: 
[email protected]
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user

Reply via email to