Hello, we have done this :

We have an independant rest api that manages the AUP 
We have implemented a 
custom AbstractPrincipalAttributeAcceptableUsagePolicyRepository
In the verify method we check if the AUP has been accepted, if not, we put 
the AUP text in the flow scope, the text is retrieved from the rest api :

requestContext.getFlowScope().put("auptext", this.getLatestAupText(principal
));

We have a custom page that display the aup text  : 
templates/casAcceptableUsagePolicyView.html 

<div class="aup-text-container">
  <p th:utext="${auptext}"/>
</div>

In the submit method of the 
AbstractPrincipalAttributeAcceptableUsagePolicyRepository, we call the rest 
api to validate the AUP and the method end like that :

WebUtils.putAcceptableUsagePolicyStatusIntoFlowScope(requestContext, 
AcceptableUsagePolicyStatus.accepted(WebUtils.getPrincipalFromRequestContext(requestContext)));
return true;

It works well for us and there are only a few classes added to the war 
overlay, it's not too much of a burden when we upgrade cas to a new version

Hope this help !

-- 
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
--- 
You received this message because you are subscribed to the Google Groups "CAS 
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/1036f444-e318-4798-80eb-a74521fcf0f1%40apereo.org.

Reply via email to