I thought it might be interesting and relatively clean to implement this 
required-checkbox requirement via customization to the login web flow, 
so I tried it out, with these successful results:

http://www.unicon.net/blog/apetro/cas_aup_checkbox

I'm not totally comfortable with creating a custom 
UsernamePasswordCredentials since acceptance of a policy isn't really a 
credential, though I certainly agree that that approach would work and 
would better take advantage of the framework binding and error support, etc.

I agree with Howard that it is simplest and probably best to implement 
this client-side via JavaScript.  Certainly a better user experience can 
be had by at least augmenting the server-side enforcement of the 
checkbox requirement with JavaScript implementing a compelling 
client-side experience reminding of and articulating the importance of 
accepting the policy.

Best wishes,

Andrew



On 12/01/2010 09:10 AM, Howard Gilbert wrote:
>
> Although Scott is right from a CAS Server point of view (Server-side) 
> the simplest way to do this is to add some JavaScript to the form, 
> intercept the submit event, check to see if the box is clicked, and 
> pop up an alert box refusing to submit the form until the box is 
> checked. You can do all that with routine JavaScript and you don't 
> have to learn about all the Spring Webflow, model binding, and 
> validation stuff. You simply leave the rest of CAS along and it 
> ignores the checkbox in the POST data stream.
>
> *From:*Scott Battaglia [mailto:scott.battag...@gmail.com]
> *Sent:* Tuesday, November 30, 2010 9:18 PM
> *To:* cas-dev@lists.jasig.org
> *Subject:* Re: [cas-dev] required checkbox
>
> Sarah,
>
> We utilize Spring's validator mechanisms.  The easiest thing to do is 
> to extend the UsernamePasswordCredential with your required field and 
> then plug in a Spring Validator to validate the credential.
>
> Take a look at the Spring Reference documentation for more information 
> the Spring Validators.
>
> Cheers,
>
> Scott
>
> On Tue, Nov 30, 2010 at 11:30 AM, Farley, Sarah (CIV) 
> <slfar...@nps.edu <mailto:slfar...@nps.edu>> wrote:
>
> Good Morning,
>
> I apologize if this is not the right avenue to pose this question.  I 
> am trying to make a checkbox (terms and conditions) required when 
> logging in through CAS. I've added the checkbox, but cannot figure out 
> how to make it required.  Any assistance is greatly appreciated.
>
> Regards,
>
> Sarah
>
> *Sarah Farley*
>
> Lead Web Developer
>
> Enterprise Information Systems, ITACS
>
> Naval Postgraduate School, Monterey Ca
>
> office: 831-656-3746  cell: 831-901-0018
>
> slfar...@nps.edu <mailto:slfar...@nps.edu>
>
> -- 
> You are currently subscribed tocas-...@lists.jasig.org  
> <mailto:cas-dev@lists.jasig.org>  as:scott.battag...@gmail.com  
> <mailto:scott.battag...@gmail.com>
>
>   
> To unsubscribe, change settings or access archives, 
> seehttp://www.ja-sig.org/wiki/display/JSG/cas-dev
>
> -- 
> You are currently subscribed tocas-...@lists.jasig.org  
> <mailto:cas-dev@lists.jasig.org>  as:howard.gilb...@yale.edu  
> <mailto:howard.gilb...@yale.edu>
> To unsubscribe, change settings or access archives, 
> seehttp://www.ja-sig.org/wiki/display/JSG/cas-dev
> -- 
> You are currently subscribed tocas-...@lists.jasig.org  
> <mailto:cas-dev@lists.jasig.org>  as: ape...@unicon.net
> To unsubscribe, change settings or access archives, see 
> http://www.ja-sig.org/wiki/display/JSG/cas-dev


-- 
You are currently subscribed to cas-dev@lists.jasig.org as: 
arch...@mail-archive.com
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-dev

Reply via email to