ProxiedService.php 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <?php
  2. /**
  3. * Licensed to Jasig under one or more contributor license
  4. * agreements. See the NOTICE file distributed with this work for
  5. * additional information regarding copyright ownership.
  6. *
  7. * Jasig licenses this file to you under the Apache License,
  8. * Version 2.0 (the "License"); you may not use this file except in
  9. * compliance with the License. You may obtain a copy of the License at:
  10. *
  11. * http://www.apache.org/licenses/LICENSE-2.0
  12. *
  13. * Unless required by applicable law or agreed to in writing, software
  14. * distributed under the License is distributed on an "AS IS" BASIS,
  15. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16. * See the License for the specific language governing permissions and
  17. * limitations under the License.
  18. *
  19. * PHP Version 5
  20. *
  21. * @file CAS/ProxiedService.php
  22. * @category Authentication
  23. * @package PhpCAS
  24. * @author Adam Franco <afranco@middlebury.edu>
  25. * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0
  26. * @link https://wiki.jasig.org/display/CASC/phpCAS
  27. */
  28. /**
  29. * This interface defines methods that allow proxy-authenticated service handlers
  30. * to interact with phpCAS.
  31. *
  32. * Proxy service handlers must implement this interface as well as call
  33. * phpCAS::initializeProxiedService($this) at some point in their implementation.
  34. *
  35. * While not required, proxy-authenticated service handlers are encouraged to
  36. * implement the CAS_ProxiedService_Testable interface to facilitate unit testing.
  37. *
  38. * @class CAS_ProxiedService
  39. * @category Authentication
  40. * @package PhpCAS
  41. * @author Adam Franco <afranco@middlebury.edu>
  42. * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0
  43. * @link https://wiki.jasig.org/display/CASC/phpCAS
  44. */
  45. interface CAS_ProxiedService
  46. {
  47. /**
  48. * Answer a service identifier (URL) for whom we should fetch a proxy ticket.
  49. *
  50. * @return string
  51. * @throws Exception If no service url is available.
  52. */
  53. public function getServiceUrl ();
  54. /**
  55. * Register a proxy ticket with the ProxiedService that it can use when
  56. * making requests.
  57. *
  58. * @param string $proxyTicket Proxy ticket string
  59. *
  60. * @return void
  61. * @throws InvalidArgumentException If the $proxyTicket is invalid.
  62. * @throws CAS_OutOfSequenceException If called after a proxy ticket has
  63. * already been initialized/set.
  64. */
  65. public function setProxyTicket ($proxyTicket);
  66. }
  67. ?>