1 | <?php |
||
48 | class ValidateController extends BaseController { |
||
49 | |||
50 | /** |
||
51 | * Valid ticket types. |
||
52 | * |
||
53 | * `/validate` checks the validity of a service ticket. `/validate` is part of the CAS 1.0 |
||
54 | * protocol and thus does not handle proxy authentication. CAS MUST respond with a ticket |
||
55 | * validation failure response when a proxy ticket is passed to `/validate`. |
||
56 | * |
||
57 | * @var array |
||
58 | */ |
||
59 | protected $validTicketTypes = array( |
||
60 | CAS\Ticket::TYPE_ST, |
||
61 | ); |
||
62 | |||
63 | /** |
||
64 | * Handles ticket validation requests. |
||
65 | * |
||
66 | * This method will attempt to set a `Content-Type: text/plain` HTTP header when called. |
||
67 | * |
||
68 | * @param array $request Request arguments. |
||
69 | * @return string Validation response. |
||
70 | */ |
||
71 | public function handleRequest( $request ) { |
||
86 | |||
87 | /** |
||
88 | * Validates a ticket, returning a ticket object, or throws an exception. |
||
89 | * |
||
90 | * Triggers the `cas_server_validation_success` action on ticket validation. |
||
91 | * |
||
92 | * @param string $ticket Service or proxy ticket. |
||
93 | * @param string $service Service URI. |
||
94 | * @return CAS\Ticket Valid ticket object associated with request. |
||
95 | * |
||
96 | * @uses \do_action() |
||
97 | * @uses \esc_url_raw() |
||
98 | * |
||
99 | * @throws \Cassava\Exception\RequestException |
||
100 | * @throws \Cassava\Exception\TicketException |
||
101 | */ |
||
102 | protected function validateRequest( $ticket = '', $service = '' ) { |
||
133 | |||
134 | } |
||
135 |