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

## Source for file openid_store.php

Documentation is available at openid_store.php

1. <?php
2. /**
3. * File containing the ezcAuthenticationOpenidStore 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. * Abstract class which provides a base for store (backend) implementations to
30. * be used in OpenID authentication.
31. *
32. * @package Authentication
33. * @version //autogen//
34. */
35. abstract class ezcAuthenticationOpenidStore
36. {
37. /**
38. * Options for OpenID stores.
39. *
40. * @var ezcAuthenticationOpenidStoreOptions
41. */
42. protected $options ;
44. /**
45. * Sets the options of this class to $options.
46. *
47. * @param ezcAuthenticationOpenidStoreOptions $options Options for this class
48. */
49. public function setOptions ( ezcAuthenticationOpenidStoreOptions $options )
50. {
51. $this-> options = $options;
52. }
54. /**
55. * Returns the options of this class.
56. *
57. * @return ezcAuthenticationOpenidStoreOptions
58. */
59. public function getOptions ()
60. {
61. return $this-> options ;
62. }
64. /**
65. * Stores the nonce in the store.
66. *
67. * Returns true if the nonce was stored successfully, and false otherwise.
68. *
69. * @param string $nonce The nonce value to store
70. * @return bool
71. */
72. abstract public function storeNonce ( $nonce );
74. /**
75. * Checks if the nonce exists and afterwards deletes it.
76. *
77. * Returns true if the nonce can be used (exists and it is still valid), and
78. * false otherwise.
79. *
80. * @param string $nonce The nonce value to check and delete
81. * @return bool
82. */
83. abstract public function useNonce ( $nonce );
85. /**
86. * Stores an association in the store linked to the OpenID provider URL.
87. *
88. * Returns true if the association was stored successfully, and false
89. * otherwise.
90. *
91. * @param string $url The URL of the OpenID provider
92. * @param ezcAuthenticationOpenidAssociation $association The association value to store
93. * @return bool
94. */
95. abstract public function storeAssociation ( $url, $association );
97. /**
98. * Returns the association linked to the OpenID provider URL.
99. *
100. * Returns null if the association could not be retrieved.
101. *
102. * @param string $url The URL of the OpenID provider
103. * @return ezcAuthenticationOpenidAssociation
104. */
105. abstract public function getAssociation ( $url );
107. /**
108. * Removes the association linked to the OpenID provider URL.
109. *
110. * Returns true if the association could be removed, and false otherwise.
111. *
112. * @param string $url The URL of the OpenID provider
113. * @return bool
114. */
115. abstract public function removeAssociation ( $url );
116. }
117. ?>

Documentation generated by phpDocumentor 1.4.3