View | Details | Raw Unified | Return to bug 14383
Collapse All | Expand All

(-)a/docs/CAS/CASProxy/examples/koha_webservice.pl (-1 / +1 lines)
Lines 19-25 Link Here
19
19
20
=head1 DESCRIPTION
20
=head1 DESCRIPTION
21
21
22
# Here is an exemple of a simple phony webservice, returning "Hello World" if the user is authenticated
22
# Here is an example of a simple phony webservice, returning "Hello World" if the user is authenticated
23
# The purpose is to show how CAS Proxy can work with koha
23
# The purpose is to show how CAS Proxy can work with koha
24
# In this configuration, this page acts as a CAS Client, instead of the user's browser.
24
# In this configuration, this page acts as a CAS Client, instead of the user's browser.
25
# This page is meant to be called from a foreign application
25
# This page is meant to be called from a foreign application
(-)a/docs/CAS/CASProxy/examples/proxy_cas.pl (-3 / +3 lines)
Lines 19-25 Link Here
19
19
20
=head1 DESCRIPTION
20
=head1 DESCRIPTION
21
21
22
# Here is an exemple of a CAS Proxy
22
# Here is an example of a CAS Proxy
23
# The proxy is a foreign application that will authenticate the user against CAS
23
# The proxy is a foreign application that will authenticate the user against CAS
24
# Once authenticated as a proxy, the foreign application will be able to call some
24
# Once authenticated as a proxy, the foreign application will be able to call some
25
# Koha webservices, proving authentication only by giving a proxy ticket
25
# Koha webservices, proving authentication only by giving a proxy ticket
Lines 58-71 if ($cgi->param('ticket')) { Link Here
58
    # We validate it against the CAS Server, providing the callback URL
58
    # We validate it against the CAS Server, providing the callback URL
59
    my $r = $cas->service_validate( $proxy_service, $cgi->param('ticket'), pgtUrl => $pgtUrl);
59
    my $r = $cas->service_validate( $proxy_service, $cgi->param('ticket'), pgtUrl => $pgtUrl);
60
60
61
    # If it is sucessful, we are authenticated
61
    # If it is successful, we are authenticated
62
    if( $r->is_success() ) {
62
    if( $r->is_success() ) {
63
	print "User authenticated as: ", $r->user(), "<br>\n";
63
	print "User authenticated as: ", $r->user(), "<br>\n";
64
    } else {
64
    } else {
65
	print "User authentication failed<br />\n";
65
	print "User authentication failed<br />\n";
66
    }
66
    }
67
67
68
    # If we have a PGTIou ticket, the proxy validation was sucessful 
68
    # If we have a PGTIou ticket, the proxy validation was successful
69
    if (defined $r->iou) {
69
    if (defined $r->iou) {
70
      print "Proxy granting ticket IOU: ", $r->iou, "<br />\n";
70
      print "Proxy granting ticket IOU: ", $r->iou, "<br />\n";
71
      my $pgtIou = $r->iou;
71
      my $pgtIou = $r->iou;
(-)a/docs/CAS/CASProxy/examples/proxy_cas_callback.pl (-2 / +1 lines)
Lines 19-25 Link Here
19
19
20
=head1 DESCRIPTION
20
=head1 DESCRIPTION
21
21
22
# Here is an exemple of a callback page for a CAS Proxy
22
# Here is an example of a callback page for a CAS Proxy
23
# This is the page the CAS server will call back with a Proxy Ticket, allowing us (the foreign application)
23
# This is the page the CAS server will call back with a Proxy Ticket, allowing us (the foreign application)
24
# to query koha webservices, being CAS authenticated 
24
# to query koha webservices, being CAS authenticated 
25
25
26
- 

Return to bug 14383