...
Default.aspx (The CAS proxier) - Your main default page
Code Block | html | html | <%@ Page||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Panel | ||||||||||||||
| ||||||||||||||
<script runat="server"> Protected Sub
sender As Object, ByVal e As System.EventArgs) If
Then
App Response: ", CASAuthentication.ProxyAppResponse)) End If End If End Sub Protected Sub
Protected Sub btnRunTest_Click(ByVal sender As Object, ByVal e As System.EventArgs)
let's add some proxy arguments to send to the CAS proxyproxy "hello")
"world") 'The InvokeCASProxy method of the CASAuthentication class will tell CAS to create a proxy granting ticket IOU 'we can later use to get our "real" proxyTicket needed to authenticate our proxy with CAS If NotIf Not CASAuthentication.InvokeCASProxy(ProxyAppUrl:=" <url{url_to_your_CAS_Proxy_ Application>Application}", __ {secure_url_to_your_CAS_Callback_Url_ Application>Application}", __ False) Then Then
<html> >Log out of CAS</a></p> <p><asp:ButtonCAS</a></p> runat="server" OnClick="btnRunTest_Click" Text="Call Test Proxy" /></ p>p> body> html> |
ProxyCallback.aspx - The CAS callback Url (This would be the same application page specified in the pgtUrl attribute in the call to InvokeCASProxy method shown above) - This assumes that your main application (the CAS proxier) and callback Url are part of the same application so that they can share application specific variables. If the callback Url is NOT part of the same application, then you must handle storing/retrieving the pgtIou/pgtId pair yourself. (e.g. store them in an external database).
...