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

## Source for file openid_association.php

Documentation is available at openid_association.php

1. <?php
2. /**
3. * File containing the ezcAuthenticationOpenidAssociation structure.
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. * Structure for defining an OpenID association between the server and the
30. * OpenID provider.
31. *
32. * @package Authentication
33. * @version //autogen//
34. */
35. class ezcAuthenticationOpenidAssociation extends ezcBaseStruct
36. {
37. /**
38. * The handle given by the OpenID provider to this association.
39. *
40. * @var string
41. */
42. public $handle ;
44. /**
45. * The shared secret generated by the OpenID provider.
46. *
47. * @var string
48. */
49. public $secret ;
51. /**
52. * The UNIX timestamp when the secret was generated.
53. *
54. * @var int
55. */
56. public $issued ;
58. /**
59. * The amount of seconds the association is valid.
60. *
61. * @var int
62. */
63. public $validity ;
65. /**
66. * The type of the association. Currently only 'HMAC-SHA1' is supported
67. * by the OpenID implementations.
68. *
69. * @var string
70. */
71. public $type ;
73. /**
74. * Constructs a new ezcAuthenticationOpenidAssociation object.
75. *
76. * @param string $handle Handle given by the OpenID provider to the association
77. * @param string $secret The shared secret generated by the OpenID provider
78. * @param int $issued The UNIX timestamp when the secret was generated
79. * @param int $validity The amount of seconds the aasociation is valid
80. * @param string $type The type of the association. Default is 'HMAC-SHA1'
81. */
82. public function __construct ( $handle, $secret, $issued, $validity, $type = 'HMAC-SHA1' )
83. {
84. $this-> handle = $handle;
85. $this-> secret = $secret;
86. $this-> issued = $issued;
87. $this-> validity = $validity;
88. $this-> type = $type;
89. }
91. /**
92. * Returns a new instance of this class with the data specified by $array.
93. *
94. * $array contains all the data members of this class in the form:
95. * array('member_name'=>value).
96. *
97. * __set_state makes this class exportable with var_export.
98. * var_export() generates code, that calls this method when it
99. * is parsed with PHP.
100. *
101. * @param array(string=>mixed) $array Associative array of data members for this class
102. * @return ezcAuthenticationOpenidAssociation
103. */
104. static public function __set_state ( array $array )
105. {
106. return new ezcAuthenticationOpenidAssociation( $array['handle'], $array['secret'], $array['issued'], $array['validity'], $array['type'] );
107. }
108. }
109. ?>

Documentation generated by phpDocumentor 1.4.3