## Apache Zeta Components Manual :: File Source for authentication_filter.php

## Source for file authentication_filter.php

Documentation is available at authentication_filter.php

1. <?php
2. /**
3. * File containing the ezcAuthenticationFilter class.
4. *
5. * Licensed to the Apache Software Foundation (ASF) under one
6. * or more contributor license agreements. See the NOTICE file
7. * distributed with this work for additional information
8. * regarding copyright ownership. The ASF licenses this file
9. * to you under the Apache License, Version 2.0 (the
10. * "License"); you may not use this file except in compliance
11. * with the License. You may obtain a copy of the License at
12. *
13. * http://www.apache.org/licenses/LICENSE-2.0
14. *
15. * Unless required by applicable law or agreed to in writing,
16. * software distributed under the License is distributed on an
17. * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18. * KIND, either express or implied. See the License for the
19. * specific language governing permissions and limitations
20. * under the License.
21. *
22. * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
23. * @filesource
24. * @package Authentication
25. * @version //autogen//
26. */
28. /**
29. * Base class for all authentication filters.
30. *
31. * The classes which extend this class must implement the run() method.
32. *
33. * This class contains the STATUS_OK constant (with value 0) which is returned
34. * by the run() method in case of success. Subclasses must define their own
35. * constants to be returned in case of insuccess.
36. *
37. * This class adds support for options for subclasses, by providing the protected
38. * property $options, and the public methods setOptions() and getOptions().
39. *
40. * @package Authentication
41. * @version //autogen//
42. */
43. abstract class ezcAuthenticationFilter
44. {
45. /**
46. * Successful authentication.
47. */
48. const STATUS_OK = 0;
50. /**
51. * Options for authentication filters.
52. *
53. * @var ezcAuthenticationFilterOptions
54. */
55. protected $options ;
57. /**
58. * Sets the options of this class to $options.
59. *
60. * @param ezcAuthenticationFilterOptions $options Options for this class
61. */
62. public function setOptions ( ezcAuthenticationFilterOptions $options )
63. {
64. $this-> options = $options;
65. }
67. /**
68. * Returns the options of this class.
69. *
70. * @return ezcAuthenticationFilterOptions
71. */
72. public function getOptions ()
73. {
74. return $this-> options ;
75. }
77. /**
78. * Runs the filter and returns a status code when finished.
79. *
80. * @param ezcAuthenticationCredentials $credentials Authentication credentials
81. * @return int
82. */
83. abstract public function run ( $credentials );
84. }
85. ?>

Documentation generated by phpDocumentor 1.4.3