CAS AJAX jQuery

Andrew Bruno andrew.bruno at gmail.com
Thu Aug 21 02:00:05 EDT 2008


Yes, you're right in that if you are already authenticated, the AJAX works fine.

We tried to intercept the 302 redirects.. but the javascript started
to become cripple and potentially buggy.

Our new approach is to fall back to "non-javascript" action's when
you're trying to access a resource that is protected.

Once your authenticated, then its all ok.

- Andrew


On Tue, Aug 19, 2008 at 10:14 PM, Scott Battaglia
<scott.battaglia at gmail.com> wrote:
> You want it to redirect based on the file you're trying to load via
> JavaScript?  I'm not sure if that works (for all our AJAX stuff, you've
> already been authenticated)
>
> -Scott
>
> On Mon, Aug 18, 2008 at 2:20 AM, Andrew Bruno <andrew.bruno at gmail.com>
> wrote:
>>
>> Are there any pointers, links, examples, etc.. for accessing a secure
>> "private" resource via AJAX?
>>
>> <html>
>> <head>
>> <script type="text/javascript" src="/js/jquery-1.2.3.pack.js"></script>
>> </head>
>> <body>
>>
>> <div id="stats"/>
>>
>> <!-- Get's the stats once logged in, placing them in the div above -->
>> <script type="text/javascript">
>>    $('#stats').load('private/stats.html');
>> </script>
>>
>> </body>
>> </html>
>>
>> and
>>
>>    <sec:http entry-point-ref="casProcessingFilterEntryPoint">
>>        <sec:intercept-url pattern="/private/**" access="ROLE_USER" />
>>        <sec:logout />
>>    </sec:http>
>>
>> It looks like it redirects to CAS login but hangs there indefinitely.
>>
>> Am I barking up the wrong tree?  Any pointers on how to do this
>> differently?
>>
>> Thanks
>> Andrew
>> _______________________________________________
>> Yale CAS mailing list
>> cas at tp.its.yale.edu
>> http://tp.its.yale.edu/mailman/listinfo/cas
>
>
> _______________________________________________
> Yale CAS mailing list
> cas at tp.its.yale.edu
> http://tp.its.yale.edu/mailman/listinfo/cas
>
>



More information about the cas mailing list