Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
<?php
2
 
3
/**
4
 * Licensed to Jasig under one or more contributor license
5
 * agreements. See the NOTICE file distributed with this work for
6
 * additional information regarding copyright ownership.
7
 *
8
 * Jasig licenses this file to you under the Apache License,
9
 * Version 2.0 (the "License"); you may not use this file except in
10
 * compliance with the License. You may obtain a copy of the License at:
11
 *
12
 * http://www.apache.org/licenses/LICENSE-2.0
13
 *
14
 * Unless required by applicable law or agreed to in writing, software
15
 * distributed under the License is distributed on an "AS IS" BASIS,
16
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
 * See the License for the specific language governing permissions and
18
 * limitations under the License.
19
 *
20
 * PHP Version 7
21
 *
22
 * @file     CAS/ProxiedService/Http.php
23
 * @category Authentication
24
 * @package  PhpCAS
25
 * @author   Adam Franco <afranco@middlebury.edu>
26
 * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
27
 * @link     https://wiki.jasig.org/display/CASC/phpCAS
28
 */
29
 
30
/**
31
 * This interface defines methods that clients should use for configuring, sending,
32
 * and receiving proxied HTTP requests.
33
 *
34
 * @class    CAS_ProxiedService_Http
35
 * @category Authentication
36
 * @package  PhpCAS
37
 * @author   Adam Franco <afranco@middlebury.edu>
38
 * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
39
 * @link     https://wiki.jasig.org/display/CASC/phpCAS
40
 */
41
interface CAS_ProxiedService_Http
42
{
43
 
44
    /*********************************************************
45
     * Configure the Request
46
    *********************************************************/
47
 
48
    /**
49
     * Set the URL of the Request
50
     *
51
     * @param string $url Url to set
52
     *
53
     * @return void
54
     * @throws CAS_OutOfSequenceException If called after the Request has been sent.
55
     */
56
    public function setUrl ($url);
57
 
58
    /*********************************************************
59
     * 2. Send the Request
60
    *********************************************************/
61
 
62
    /**
63
     * Perform the request.
64
     *
65
     * @return bool TRUE on success, FALSE on failure.
66
     * @throws CAS_OutOfSequenceException If called multiple times.
67
     */
68
    public function send ();
69
 
70
    /*********************************************************
71
     * 3. Access the response
72
    *********************************************************/
73
 
74
    /**
75
     * Answer the headers of the response.
76
     *
77
     * @return array An array of header strings.
78
     * @throws CAS_OutOfSequenceException If called before the Request has been sent.
79
     */
80
    public function getResponseHeaders ();
81
 
82
    /**
83
     * Answer the body of response.
84
     *
85
     * @return string
86
     * @throws CAS_OutOfSequenceException If called before the Request has been sent.
87
     */
88
    public function getResponseBody ();
89
 
90
}
91
?>