Skip to content
This repository
Browse code

.svn removed

  • Loading branch information...
commit c5892ac4abbdf192d99fa76bbc5a647d1015c03f 1 parent d553553
Marco Montanari authored May 01, 2011

Showing 53 changed files with 0 additions and 5,076 deletions. Show diff stats Hide diff stats

  1. 11  bin/.svn/all-wcprops
  2. 7  bin/.svn/dir-prop-base
  3. 62  bin/.svn/entries
  4. 39  bin/.svn/text-base/checkmicroids.py.svn-base
  5. 65  openid/.svn/all-wcprops
  6. 7  openid/.svn/dir-prop-base
  7. 374  openid/.svn/entries
  8. 13  openid/.svn/text-base/CHANGELOG.svn-base
  9. 21  openid/.svn/text-base/COPYING.svn-base
  10. 142  openid/.svn/text-base/NEWS.svn-base
  11. 36  openid/.svn/text-base/README.svn-base
  12. 21  openid/.svn/text-base/__init__.py.svn-base
  13. 321  openid/.svn/text-base/association.py.svn-base
  14. 171  openid/.svn/text-base/cryptutil.py.svn-base
  15. 42  openid/.svn/text-base/dh.py.svn-base
  16. 118  openid/.svn/text-base/kvform.py.svn-base
  17. 116  openid/.svn/text-base/oidutil.py.svn-base
  18. 23  openid/server/.svn/all-wcprops
  19. 7  openid/server/.svn/dir-prop-base
  20. 130  openid/server/.svn/entries
  21. 4  openid/server/.svn/text-base/__init__.py.svn-base
  22. 1,496  openid/server/.svn/text-base/server.py.svn-base
  23. 263  openid/server/.svn/text-base/trustroot.py.svn-base
  24. 17  openid/store/.svn/all-wcprops
  25. 7  openid/store/.svn/dir-prop-base
  26. 96  openid/store/.svn/entries
  27. 6  openid/store/.svn/text-base/__init__.py.svn-base
  28. 203  openid/store/.svn/text-base/interface.py.svn-base
  29. 23  server/.svn/all-wcprops
  30. 7  server/.svn/dir-prop-base
  31. 130  server/.svn/entries
  32. 17  server/.svn/text-base/__init__.py.svn-base
  33. 40  server/.svn/text-base/models.py.svn-base
  34. 99  server/.svn/text-base/views.py.svn-base
  35. 11  templates/.svn/all-wcprops
  36. 68  templates/.svn/entries
  37. 11  templates/.svn/text-base/base.html.svn-base
  38. 11  templates/server/.svn/all-wcprops
  39. 62  templates/server/.svn/entries
  40. 12  templates/server/.svn/text-base/yadis.xrds.svn-base
  41. 29  templates/users/.svn/all-wcprops
  42. 6  templates/users/.svn/dir-prop-base
  43. 164  templates/users/.svn/entries
  44. 15  templates/users/.svn/text-base/accept_root.html.svn-base
  45. 38  templates/users/.svn/text-base/login.html.svn-base
  46. 53  templates/users/.svn/text-base/userpage.html.svn-base
  47. 13  templates/users/.svn/text-base/yadis.xrds.svn-base
  48. 23  users/.svn/all-wcprops
  49. 7  users/.svn/dir-prop-base
  50. 130  users/.svn/entries
  51. 17  users/.svn/text-base/__init__.py.svn-base
  52. 202  users/.svn/text-base/models.py.svn-base
  53. 70  users/.svn/text-base/views.py.svn-base
11  bin/.svn/all-wcprops
... ...
@@ -1,11 +0,0 @@
1  
-K 25
2  
-svn:wc:ra_dav:version-url
3  
-V 40
4  
-/djangoid/!svn/ver/15/trunk/djangoid/bin
5  
-END
6  
-checkmicroids.py
7  
-K 25
8  
-svn:wc:ra_dav:version-url
9  
-V 57
10  
-/djangoid/!svn/ver/15/trunk/djangoid/bin/checkmicroids.py
11  
-END
7  bin/.svn/dir-prop-base
... ...
@@ -1,7 +0,0 @@
1  
-K 10
2  
-svn:ignore
3  
-V 12
4  
-*.pyc
5  
-*.bak
6  
-
7  
-END
62  bin/.svn/entries
... ...
@@ -1,62 +0,0 @@
1  
-10
2  
-
3  
-dir
4  
-23
5  
-http://svn.nicolast.be/djangoid/trunk/djangoid/bin
6  
-http://svn.nicolast.be/djangoid
7  
-
8  
-
9  
-
10  
-2007-01-05T10:36:18.846406Z
11  
-15
12  
-nicolast
13  
-has-props
14  
-
15  
-
16  
-
17  
-
18  
-
19  
-
20  
-
21  
-
22  
-
23  
-
24  
-
25  
-
26  
-
27  
-f8cb6b53-8725-0410-af8d-ddfe7b48cda9
28  
-
29  
-checkmicroids.py
30  
-file
31  
-
32  
-
33  
-
34  
-
35  
-2011-05-01T11:56:02.000000Z
36  
-e23e56ce35140fbdbd92eb896b17b097
37  
-2007-01-05T10:36:18.846406Z
38  
-15
39  
-nicolast
40  
-
41  
-
42  
-
43  
-
44  
-
45  
-
46  
-
47  
-
48  
-
49  
-
50  
-
51  
-
52  
-
53  
-
54  
-
55  
-
56  
-
57  
-
58  
-
59  
-
60  
-
61  
-1277
62  
-
39  bin/.svn/text-base/checkmicroids.py.svn-base
... ...
@@ -1,39 +0,0 @@
1  
-#Djangoid - Django-based OpenID server/provider
2  
-#Copyright (C) 2006  Nicolas Trangez <ikke nicolast be>
3  
-#
4  
-#This program is free software; you can redistribute it and/or modify
5  
-#it under the terms of the GNU General Public License as published by
6  
-#the Free Software Foundation; either version 2 of the License.
7  
-#
8  
-#This program is distributed in the hope that it will be useful,
9  
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
10  
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11  
-#GNU General Public License for more details.
12  
-#
13  
-#You should have received a copy of the GNU General Public License
14  
-#along with this program; if not, write to the Free Software
15  
-#Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
16  
-#
17  
-#EOL
18  
-#!/usr/bin/env python
19  
-import sys
20  
-import os
21  
-
22  
-if os.environ["PWD"][-4:] == "/bin":
23  
-        sys.path.append("../..")
24  
-else:
25  
-        sys.path.append("../")
26  
-os.environ["DJANGO_SETTINGS_MODULE"] = "djangoid.settings"
27  
-
28  
-from djangoid.users.models import ClaimedUri
29  
-
30  
-def main():
31  
-        uris = ClaimedUri.objects.all()
32  
-        for uri in uris:
33  
-                uri.update_validity()
34  
-
35  
-                print "Checked", uri.uri, "for", uri.user.djangouser,", result is", uri.is_valid
36  
-
37  
-
38  
-if __name__ == "__main__":
39  
-        main()
65  openid/.svn/all-wcprops
... ...
@@ -1,65 +0,0 @@
1  
-K 25
2  
-svn:wc:ra_dav:version-url
3  
-V 42
4  
-/djangoid/!svn/ver/8/trunk/djangoid/openid
5  
-END
6  
-oidutil.py
7  
-K 25
8  
-svn:wc:ra_dav:version-url
9  
-V 53
10  
-/djangoid/!svn/ver/3/trunk/djangoid/openid/oidutil.py
11  
-END
12  
-dh.py
13  
-K 25
14  
-svn:wc:ra_dav:version-url
15  
-V 48
16  
-/djangoid/!svn/ver/3/trunk/djangoid/openid/dh.py
17  
-END
18  
-association.py
19  
-K 25
20  
-svn:wc:ra_dav:version-url
21  
-V 57
22  
-/djangoid/!svn/ver/3/trunk/djangoid/openid/association.py
23  
-END
24  
-__init__.py
25  
-K 25
26  
-svn:wc:ra_dav:version-url
27  
-V 54
28  
-/djangoid/!svn/ver/3/trunk/djangoid/openid/__init__.py
29  
-END
30  
-cryptutil.py
31  
-K 25
32  
-svn:wc:ra_dav:version-url
33  
-V 55
34  
-/djangoid/!svn/ver/3/trunk/djangoid/openid/cryptutil.py
35  
-END
36  
-CHANGELOG
37  
-K 25
38  
-svn:wc:ra_dav:version-url
39  
-V 52
40  
-/djangoid/!svn/ver/3/trunk/djangoid/openid/CHANGELOG
41  
-END
42  
-COPYING
43  
-K 25
44  
-svn:wc:ra_dav:version-url
45  
-V 50
46  
-/djangoid/!svn/ver/3/trunk/djangoid/openid/COPYING
47  
-END
48  
-kvform.py
49  
-K 25
50  
-svn:wc:ra_dav:version-url
51  
-V 52
52  
-/djangoid/!svn/ver/3/trunk/djangoid/openid/kvform.py
53  
-END
54  
-NEWS
55  
-K 25
56  
-svn:wc:ra_dav:version-url
57  
-V 47
58  
-/djangoid/!svn/ver/3/trunk/djangoid/openid/NEWS
59  
-END
60  
-README
61  
-K 25
62  
-svn:wc:ra_dav:version-url
63  
-V 49
64  
-/djangoid/!svn/ver/3/trunk/djangoid/openid/README
65  
-END
7  openid/.svn/dir-prop-base
... ...
@@ -1,7 +0,0 @@
1  
-K 10
2  
-svn:ignore
3  
-V 12
4  
-*.pyc
5  
-*.bak
6  
-
7  
-END
374  openid/.svn/entries
... ...
@@ -1,374 +0,0 @@
1  
-10
2  
-
3  
-dir
4  
-23
5  
-http://svn.nicolast.be/djangoid/trunk/djangoid/openid
6  
-http://svn.nicolast.be/djangoid
7  
-
8  
-
9  
-
10  
-2007-01-03T11:26:42.798568Z
11  
-8
12  
-nicolast
13  
-has-props
14  
-
15  
-
16  
-
17  
-
18  
-
19  
-
20  
-
21  
-
22  
-
23  
-
24  
-
25  
-
26  
-
27  
-f8cb6b53-8725-0410-af8d-ddfe7b48cda9
28  
-
29  
-oidutil.py
30  
-file
31  
-
32  
-
33  
-
34  
-
35  
-2011-05-01T11:56:02.000000Z
36  
-ac75c3781bfaf235fb86986de4642692
37  
-2006-12-26T19:59:06.087498Z
38  
-1
39  
-nicolast
40  
-
41  
-
42  
-
43  
-
44  
-
45  
-
46  
-
47  
-
48  
-
49  
-
50  
-
51  
-
52  
-
53  
-
54  
-
55  
-
56  
-
57  
-
58  
-
59  
-
60  
-
61  
-2959
62  
-
63  
-dh.py
64  
-file
65  
-
66  
-
67  
-
68  
-
69  
-2011-05-01T11:56:02.000000Z
70  
-dfc5291d89039411ca8457e7b45e1565
71  
-2006-12-26T19:59:06.087498Z
72  
-1
73  
-nicolast
74  
-
75  
-
76  
-
77  
-
78  
-
79  
-
80  
-
81  
-
82  
-
83  
-
84  
-
85  
-
86  
-
87  
-
88  
-
89  
-
90  
-
91  
-
92  
-
93  
-
94  
-
95  
-1598
96  
-
97  
-association.py
98  
-file
99  
-
100  
-
101  
-
102  
-
103  
-2011-05-01T11:56:02.000000Z
104  
-4e59e5b340327e2172194f36b0debe9f
105  
-2006-12-26T19:59:06.087498Z
106  
-1
107  
-nicolast
108  
-
109  
-
110  
-
111  
-
112  
-
113  
-
114  
-
115  
-
116  
-
117  
-
118  
-
119  
-
120  
-
121  
-
122  
-
123  
-
124  
-
125  
-
126  
-
127  
-
128  
-
129  
-8930
130  
-
131  
-server
132  
-dir
133  
-
134  
-__init__.py
135  
-file
136  
-
137  
-
138  
-
139  
-
140  
-2011-05-01T11:56:02.000000Z
141  
-7a54b1f024a0543855d22df4f86847ef
142  
-2006-12-26T19:59:06.087498Z
143  
-1
144  
-nicolast
145  
-
146  
-
147  
-
148  
-
149  
-
150  
-
151  
-
152  
-
153  
-
154  
-
155  
-
156  
-
157  
-
158  
-
159  
-
160  
-
161  
-
162  
-
163  
-
164  
-
165  
-
166  
-659
167  
-
168  
-cryptutil.py
169  
-file
170  
-
171  
-
172  
-
173  
-
174  
-2011-05-01T11:56:02.000000Z
175  
-89c6af83e71529a73ce53df7bcc31fb5
176  
-2006-12-26T19:59:06.087498Z
177  
-1
178  
-nicolast
179  
-
180  
-
181  
-
182  
-
183  
-
184  
-
185  
-
186  
-
187  
-
188  
-
189  
-
190  
-
191  
-
192  
-
193  
-
194  
-
195  
-
196  
-
197  
-
198  
-
199  
-
200  
-5057
201  
-
202  
-CHANGELOG
203  
-file
204  
-
205  
-
206  
-
207  
-
208  
-2011-05-01T11:56:02.000000Z
209  
-c6a46b52d55249a3da1abadbedcaa1e1
210  
-2006-12-26T19:59:06.087498Z
211  
-1
212  
-nicolast
213  
-
214  
-
215  
-
216  
-
217  
-
218  
-
219  
-
220  
-
221  
-
222  
-
223  
-
224  
-
225  
-
226  
-
227  
-
228  
-
229  
-
230  
-
231  
-
232  
-
233  
-
234  
-392
235  
-
236  
-COPYING
237  
-file
238  
-
239  
-
240  
-
241  
-
242  
-2011-05-01T11:56:02.000000Z
243  
-f9bb766a1313f6efb2602eee81e702b2
244  
-2006-12-26T19:59:06.087498Z
245  
-1
246  
-nicolast
247  
-
248  
-
249  
-
250  
-
251  
-
252  
-
253  
-
254  
-
255  
-
256  
-
257  
-
258  
-
259  
-
260  
-
261  
-
262  
-
263  
-
264  
-
265  
-
266  
-
267  
-
268  
-900
269  
-
270  
-kvform.py
271  
-file
272  
-
273  
-
274  
-
275  
-
276  
-2011-05-01T11:56:02.000000Z
277  
-f4d6326a241760ba4c4e26c5b5c61e0c
278  
-2006-12-26T19:59:06.087498Z
279  
-1
280  
-nicolast
281  
-
282  
-
283  
-
284  
-
285  
-
286  
-
287  
-
288  
-
289  
-
290  
-
291  
-
292  
-
293  
-
294  
-
295  
-
296  
-
297  
-
298  
-
299  
-
300  
-
301  
-
302  
-3111
303  
-
304  
-store
305  
-dir
306  
-
307  
-NEWS
308  
-file
309  
-
310  
-
311  
-
312  
-
313  
-2011-05-01T11:56:02.000000Z
314  
-f9cd9d977c4a98030b7b835292a60f51
315  
-2006-12-26T19:59:06.087498Z
316  
-1
317  
-nicolast
318  
-
319  
-
320  
-
321  
-
322  
-
323  
-
324  
-
325  
-
326  
-
327  
-
328  
-
329  
-
330  
-
331  
-
332  
-
333  
-
334  
-
335  
-
336  
-
337  
-
338  
-
339  
-5289
340  
-
341  
-README
342  
-file
343  
-
344  
-
345  
-
346  
-
347  
-2011-05-01T11:56:02.000000Z
348  
-9a2a799cae57930e07d6da92e6acdd2c
349  
-2006-12-26T19:59:06.087498Z
350  
-1
351  
-nicolast
352  
-
353  
-
354  
-
355  
-
356  
-
357  
-
358  
-
359  
-
360  
-
361  
-
362  
-
363  
-
364  
-
365  
-
366  
-
367  
-
368  
-
369  
-
370  
-
371  
-
372  
-
373  
-669
374  
-
13  openid/.svn/text-base/CHANGELOG.svn-base
... ...
@@ -1,13 +0,0 @@
1  
-Fri Dec  8 11:18:14 PST 2006  Kevin Turner <kevin@janrain.com>
2  
-  * drop obsolete epydoc parameter
3  
-
4  
-    M ./admin/makedoc -1 +1
5  
-
6  
-Mon Nov 27 15:39:42 PST 2006  Kevin Turner <kevin@janrain.com>
7  
-  * examples/consumer: s/openid_url/openid_identifier/ in the input form
8  
-
9  
-    M ./examples/consumer.py -3 +3
10  
-
11  
-Fri Aug 18 20:12:49 PDT 2006  Kevin Turner <kevin@janrain.com>
12  
-  tagged release-1.1.2-rc1
13  
-
21  openid/.svn/text-base/COPYING.svn-base
... ...
@@ -1,21 +0,0 @@
1  
-Python OpenID - OpenID consumer and server library
2  
-
3  
-Copyright (C) 2005, 2006 Janrain, Inc.
4  
-
5  
-This library is free software; you can redistribute it and/or
6  
-modify it under the terms of the GNU Lesser General Public
7  
-License as published by the Free Software Foundation; either
8  
-version 2.1 of the License, or (at your option) any later version.
9  
-
10  
-This library is distributed in the hope that it will be useful,
11  
-but WITHOUT ANY WARRANTY; without even the implied warranty of
12  
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  
-Lesser General Public License for more details.
14  
-
15  
-You should have received a copy of the GNU Lesser General Public
16  
-License along with this library; if not, write to the Free Software
17  
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
18  
-
19  
-More info about Python OpenID:
20  
-openid@janrain.com
21  
-http://www.openidenabled.com/openid/libraries/python
142  openid/.svn/text-base/NEWS.svn-base
... ...
@@ -1,142 +0,0 @@
1  
-What's New in Python OpenID 1.1.2
2  
-=================================
3  
-
4  
-i-name Support
5  
---------------
6  
-
7  
-This version of the library allows the use of XRI as OpenID identifiers,
8  
-allowing users to log in with their i-names.  For full XRI compatibility,
9  
-relying parties integrating this library should take note of the user's
10  
-CanonicalID, as described in the "Identifying the End User" section of the
11  
-OpenID 2.0 specification.
12  
-
13  
-Bug Fixes
14  
----------
15  
-
16  
-A variety of bug fixes were included in this release, mostly relating to
17  
-international issues such as dealing with other character sets, Unicode,
18  
-incorrectly flagging certain Norwegian trust roots as suspect, and operation
19  
-of the filesystem-backed store on exotic platforms.
20  
-
21  
-Dependencies
22  
-------------
23  
-
24  
- * urljr 1.0.1
25  
- * yadis 1.1.0
26  
-
27  
-
28  
-What's New in Python OpenID 1.1.0
29  
-=================================
30  
-
31  
-Version 1.1 of the Python OpenID library implements recent changes to
32  
-the OpenID specification as well as making API changes that should
33  
-make integration with applications easier.
34  
-
35  
-Yadis Support
36  
--------------
37  
-
38  
-One of the major changes to OpenID since the last release has been the
39  
-approval of Yadis discovery as the preferred way to specify the OpenID
40  
-metadata for an identity URL instead of using <link> tags in
41  
-HTML. This library does Yadis discovery, and if that fails, it falls
42  
-back to old-style discovery.
43  
-
44  
-Some advantages of Yadis support are:
45  
-
46  
- * Support for fallback if your primary OpenID provider is not available
47  
-
48  
- * Support for load-balancing between OpenID servers
49  
-
50  
- * Easy interoperability for different identity services
51  
-
52  
-For more information about Yadis, see http://yadis.org/ or
53  
-http://www.openidenabled.com/yadis/
54  
-
55  
-Extension Support
56  
------------------
57  
-
58  
-OpenID also has formalized support for extensions. Extensions are a
59  
-mechanism for transferring information from the consumer to the server
60  
-and from the server to the consumer in the process of performing
61  
-OpenID authentication. Extensions are implemented as additional
62  
-namespaced query arguments that go along with standard OpenID requests
63  
-and responses. This library provides a simple API for adding extension
64  
-arguments to requests and extracting extension responses from replies.
65  
-
66  
-Dependencies
67  
-------------
68  
-
69  
-These dependencies should be available from wherever you acquired the
70  
-OpenID library.
71  
-
72  
- * urljr - The fetcher abstraction from the previous OpenID library
73  
-   has been extended and is also used for the Yadis library. Because
74  
-   the Yadis library is useful without the OpenID library, the HTTP
75  
-   fetching code has been rolled into its own package. Additionally,
76  
-   the library now has the concept of a default fetcher to make APIs
77  
-   simpler.
78  
-
79  
- * yadis - The Yadis library provides a general discovery layer that
80  
-   has been adopted by OpenID as well as other identity-related
81  
-   protocols. Most OpenID identity URLs will work without the Yadis
82  
-   library, but as time goes on, this library will be more and more
83  
-   important.
84  
-
85  
-Consumer API
86  
-------------
87  
-
88  
-The consumer API has been changed for more natural use as well as to
89  
-support extension arguments.
90  
-
91  
- * OpenIDConsumer(store, [fetcher], [immediate]) is now
92  
-   Consumer(session, store)
93  
-
94  
-  - The session object is a dictionary-like object that should be
95  
-    tied to the requesting HTTP agent, for example, using a session
96  
-    ID cookie. It is used for Yadis fallback and holding the state
97  
-    of the OpenID transaction between the redirect to the server
98  
-    and the response. The values that are placed in the session are
99  
-    namespaced, so there should not be a conflict with other uses
100  
-    of the same session. The session namespace is an attribute of
101  
-    the Consumer object.
102  
-
103  
-  - Because the consumer object now does session management, it is
104  
-    necessary to construct a new consumer object for every
105  
-    request. Creating consumer objects is light-weight.
106  
-
107  
- * OpenIDConsumer.beginAuth(user_url) is now Consumer.begin(user_url)
108  
-   and either returns an AuthRequest object or raises an
109  
-   exception. There is no more tuple unpacking or status codes.
110  
-
111  
- * OpenIDConsumer.constructRedirect(authreq, return_to, trust_root) is
112  
-   now AuthRequest.redirectURL(trust_root, return_to, [immediate]).
113  
-
114  
- * OpenIDConsumer.completeAuth(token, query) is now
115  
-   Consumer.complete(query). It no longer returns a tuple. Instead it
116  
-   returns an object that has a status code and additional information
117  
-   about the response. See the API documentation for more information.
118  
-
119  
-Server API
120  
-----------
121  
-
122  
-The server API has been changed for greater extensibility.  Instead
123  
-of taking an "is_authorized" callback, processing happens in several
124  
-stages, allowing you to insert extension data into the response
125  
-before it is signed and returned.  See the documentation for the
126  
-openid.server.server module.
127  
-
128  
-Fetcher API
129  
------------
130  
-
131  
- * fetcher was openid.consumer.fetchers.OpenIDHTTPFetcher, is now
132  
-   urljr.fetchers.HTTPFetcher.  get() and post() have been replaced by
133  
-   fetch(), see urljr.fetchers for details.
134  
-
135  
-Upgrading
136  
----------
137  
-
138  
-The server changed the way it indexes associations in the store, so if
139  
-you're upgrading a server installation, we recommend you clear the old
140  
-records from your store when you do so.  As a consequence, consumers
141  
-will re-establish associations with your server a little sooner than
142  
-they would have otherwise.
36  openid/.svn/text-base/README.svn-base
... ...
@@ -1,36 +0,0 @@
1  
-This is the Python OpenID library.
2  
-
3  
-
4  
-INSTALLATION
5  
-============
6  
-
7  
-To install the base library, just run the following command:
8  
-
9  
-python setup.py install
10  
-
11  
-
12  
-GETTING STARTED
13  
-===============
14  
-
15  
-The examples directory includes an example server and consumer
16  
-implementation.  See the README file in that directory for more
17  
-information on running the examples.
18  
-
19  
-Library documentation is available in html form in the doc directory.
20  
-
21  
-
22  
-DOCUMENTATION
23  
-=============
24  
-
25  
-The documentation in this library is in Epydoc format, which is
26  
-detailed at:
27  
-
28  
-  http://epydoc.sourceforge.net/
29  
-
30  
-
31  
-CONTACT
32  
-=======
33  
-
34  
-Send bug reports, suggestions, comments, and questions to
35  
-dev@lists.openidenabled.com.
36  
-
21  openid/.svn/text-base/__init__.py.svn-base
... ...
@@ -1,21 +0,0 @@
1  
-"""
2  
-This package is an implementation of the OpenID specification in
3  
-Python.  It contains code for both server and consumer
4  
-implementations.  For information on implementing an OpenID consumer,
5  
-see the C{L{openid.consumer.consumer}} module.  For information on
6  
-implementing an OpenID server, see the C{L{openid.server.server}}
7  
-module.
8  
-"""
9  
-
10  
-__version__ = '[library version:1.2.0]'[17:-1]
11  
-
12  
-# Parse the version info
13  
-try:
14  
-    version_info = map(int, __version__.split('.'))
15  
-except ValueError:
16  
-    version_info = (None, None, None)
17  
-else:
18  
-    if len(version_info) != 3:
19  
-        version_info = (None, None, None)
20  
-    else:
21  
-        version_info = tuple(version_info)
321  openid/.svn/text-base/association.py.svn-base
... ...
@@ -1,321 +0,0 @@
1  
-"""
2  
-This module contains code for dealing with associations between
3  
-consumers and servers.
4  
-"""
5  
-
6  
-import time
7  
-
8  
-from openid import cryptutil
9  
-from openid import kvform
10  
-from openid import oidutil
11  
-
12  
-class Association(object):
13  
-    """
14  
-    This class represents an association between a server and a
15  
-    consumer.  In general, users of this library will never see
16  
-    instances of this object.  The only exception is if you implement
17  
-    a custom C{L{OpenIDStore<openid.store.interface.OpenIDStore>}}.
18  
-
19  
-    If you do implement such a store, it will need to store the values
20  
-    of the C{L{handle}}, C{L{secret}}, C{L{issued}}, C{L{lifetime}}, and
21  
-    C{L{assoc_type}} instance variables.
22  
-
23  
-    @ivar handle: This is the handle the server gave this association.
24  
-
25  
-    @type handle: C{str}
26  
-
27  
-
28  
-    @ivar secret: This is the shared secret the server generated for
29  
-        this association.
30  
-
31  
-    @type secret: C{str}
32  
-
33  
-
34  
-    @ivar issued: This is the time this association was issued, in
35  
-        seconds since 00:00 GMT, January 1, 1970.  (ie, a unix
36  
-        timestamp)
37  
-
38  
-    @type issued: C{int}
39  
-
40  
-
41  
-    @ivar lifetime: This is the amount of time this association is
42  
-        good for, measured in seconds since the association was
43  
-        issued.
44  
-
45  
-    @type lifetime: C{int}
46  
-
47  
-
48  
-    @ivar assoc_type: This is the type of association this instance
49  
-        represents.  The only valid value of this field at this time
50  
-        is C{'HMAC-SHA1'}, but new types may be defined in the future.
51  
-
52  
-    @type assoc_type: C{str}
53  
-
54  
-
55  
-    @sort: __init__, fromExpiresIn, getExpiresIn, __eq__, __ne__,
56  
-        handle, secret, issued, lifetime, assoc_type
57  
-    """
58  
-
59  
-    # This is a HMAC-SHA1 specific value.
60  
-    SIG_LENGTH = 20
61  
-
62  
-    # The ordering and name of keys as stored by serialize
63  
-    assoc_keys = [
64  
-        'version',
65  
-        'handle',
66  
-        'secret',
67  
-        'issued',
68  
-        'lifetime',
69  
-        'assoc_type',
70  
-        ]
71  
-
72  
-    def fromExpiresIn(cls, expires_in, handle, secret, assoc_type):
73  
-        """
74  
-        This is an alternate constructor used by the OpenID consumer
75  
-        library to create associations.  C{L{OpenIDStore
76  
-        <openid.store.interface.OpenIDStore>}} implementations
77  
-        shouldn't use this constructor.
78  
-
79  
-
80  
-        @param expires_in: This is the amount of time this association
81  
-            is good for, measured in seconds since the association was
82  
-            issued.
83  
-
84  
-        @type expires_in: C{int}
85  
-
86  
-
87  
-        @param handle: This is the handle the server gave this
88  
-            association.
89  
-
90  
-        @type handle: C{str}
91  
-
92  
-
93  
-        @param secret: This is the shared secret the server generated
94  
-            for this association.
95  
-
96  
-        @type secret: C{str}
97  
-
98  
-
99  
-        @param assoc_type: This is the type of association this
100  
-            instance represents.  The only valid value of this field
101  
-            at this time is C{'HMAC-SHA1'}, but new types may be
102  
-            defined in the future.
103  
-
104  
-        @type assoc_type: C{str}
105  
-        """
106  
-        issued = int(time.time())
107  
-        lifetime = expires_in
108  
-        return cls(handle, secret, issued, lifetime, assoc_type)
109  
-
110  
-    fromExpiresIn = classmethod(fromExpiresIn)
111  
-
112  
-    def __init__(self, handle, secret, issued, lifetime, assoc_type):
113  
-        """
114  
-        This is the standard constructor for creating an association.
115  
-
116  
-
117  
-        @param handle: This is the handle the server gave this
118  
-            association.
119  
-
120  
-        @type handle: C{str}
121  
-
122  
-
123  
-        @param secret: This is the shared secret the server generated
124  
-            for this association.
125  
-
126  
-        @type secret: C{str}
127  
-
128  
-
129  
-        @param issued: This is the time this association was issued,
130  
-            in seconds since 00:00 GMT, January 1, 1970.  (ie, a unix
131  
-            timestamp)
132  
-
133  
-        @type issued: C{int}
134  
-
135  
-
136  
-        @param lifetime: This is the amount of time this association
137  
-            is good for, measured in seconds since the association was
138  
-            issued.
139  
-
140  
-        @type lifetime: C{int}
141  
-
142  
-
143  
-        @param assoc_type: This is the type of association this
144  
-            instance represents.  The only valid value of this field
145  
-            at this time is C{'HMAC-SHA1'}, but new types may be
146  
-            defined in the future.
147  
-
148  
-        @type assoc_type: C{str}
149  
-        """
150  
-        if assoc_type != 'HMAC-SHA1':
151  
-            fmt = 'HMAC-SHA1 is the only supported association type (got %r)'
152  
-            raise ValueError(fmt % (assoc_type,))
153  
-
154  
-        self.handle = handle
155  
-        self.secret = secret
156  
-        self.issued = issued
157  
-        self.lifetime = lifetime
158  
-        self.assoc_type = assoc_type
159  
-
160  
-    def getExpiresIn(self, now=None):
161  
-        """
162  
-        This returns the number of seconds this association is still
163  
-        valid for, or C{0} if the association is no longer valid.
164  
-
165  
-
166  
-        @return: The number of seconds this association is still valid
167  
-            for, or C{0} if the association is no longer valid.
168  
-
169  
-        @rtype: C{int}
170  
-        """
171  
-        if now is None:
172  
-            now = int(time.time())
173  
-
174  
-        return max(0, self.issued + self.lifetime - now)
175  
-
176  
-    expiresIn = property(getExpiresIn)
177  
-
178  
-    def __eq__(self, other):
179  
-        """
180  
-        This checks to see if two C{L{Association}} instances
181  
-        represent the same association.
182  
-
183  
-
184  
-        @return: C{True} if the two instances represent the same
185  
-            association, C{False} otherwise.
186  
-
187  
-        @rtype: C{bool}
188  
-        """
189  
-        return type(self) is type(other) and self.__dict__ == other.__dict__
190  
-
191  
-    def __ne__(self, other):
192  
-        """
193  
-        This checks to see if two C{L{Association}} instances
194  
-        represent different associations.
195  
-
196  
-
197  
-        @return: C{True} if the two instances represent different
198  
-            associations, C{False} otherwise.
199  
-
200  
-        @rtype: C{bool}
201  
-        """
202  
-        return not (self == other)
203  
-
204  
-    def serialize(self):
205  
-        """
206  
-        Convert an association to KV form.
207  
-
208  
-        @return: String in KV form suitable for deserialization by
209  
-            deserialize.
210  
-
211  
-        @rtype: str
212  
-        """
213  
-        data = {
214  
-            'version':'2',
215  
-            'handle':self.handle,
216  
-            'secret':oidutil.toBase64(self.secret),
217  
-            'issued':str(int(self.issued)),
218  
-            'lifetime':str(int(self.lifetime)),
219  
-            'assoc_type':self.assoc_type
220  
-            }
221  
-
222  
-        assert len(data) == len(self.assoc_keys)
223  
-        pairs = []
224  
-        for field_name in self.assoc_keys:
225  
-            pairs.append((field_name, data[field_name]))
226  
-
227  
-        return kvform.seqToKV(pairs, strict=True)
228  
-
229  
-    def deserialize(cls, assoc_s):
230  
-        """
231  
-        Parse an association as stored by serialize().
232  
-
233  
-        inverse of serialize
234  
-
235  
-
236  
-        @param assoc_s: Association as serialized by serialize()
237  
-
238  
-        @type assoc_s: str
239  
-
240  
-
241  
-        @return: instance of this class
242  
-        """
243  
-        pairs = kvform.kvToSeq(assoc_s, strict=True)
244  
-        keys = []
245  
-        values = []
246  
-        for k, v in pairs:
247  
-            keys.append(k)
248  
-            values.append(v)
249  
-
250  
-        if keys != cls.assoc_keys:
251  
-            raise ValueError('Unexpected key values: %r', keys)
252  
-
253  
-        version, handle, secret, issued, lifetime, assoc_type = values
254  
-        if version != '2':
255  
-            raise ValueError('Unknown version: %r' % version)
256  
-        issued = int(issued)
257  
-        lifetime = int(lifetime)
258  
-        secret = oidutil.fromBase64(secret)
259  
-        return cls(handle, secret, issued, lifetime, assoc_type)
260  
-
261  
-    deserialize = classmethod(deserialize)
262  
-
263  
-    def sign(self, pairs):
264  
-        """
265  
-        Generate a signature for a sequence of (key, value) pairs
266  
-
267  
-
268  
-        @param pairs: The pairs to sign, in order
269  
-
270  
-        @type pairs: sequence of (str, str)
271  
-
272  
-
273  
-        @return: The binary signature of this sequence of pairs
274  
-
275  
-        @rtype: str
276  
-        """
277  
-        assert self.assoc_type == 'HMAC-SHA1'
278  
-        kv = kvform.seqToKV(pairs)
279  
-        return cryptutil.hmacSha1(self.secret, kv)
280  
-
281  
-    def signDict(self, fields, data, prefix='openid.'):
282  
-        """
283  
-        Generate a signature for some fields in a dictionary
284  
-
285  
-
286  
-        @param fields: The fields to sign, in order
287  
-
288  
-        @type fields: sequence of str
289  
-
290  
-
291  
-        @param data: Dictionary of values to sign
292  
-
293  
-        @type data: {str:str}
294  
-
295  
-
296  
-        @return: the signature, base64 encoded
297  
-
298  
-        @rtype: str
299  
-        """
300  
-        pairs = []
301  
-        for field in fields:
302  
-            pairs.append((field, data.get(prefix + field, '')))
303  
-
304  
-        return oidutil.toBase64(self.sign(pairs))
305  
-
306  
-    def addSignature(self, fields, data, prefix='openid.'):
307  
-        sig = self.signDict(fields, data, prefix)
308  
-        signed = ','.join(fields)
309  
-        data[prefix + 'sig'] = sig
310  
-        data[prefix + 'signed'] = signed
311  
-
312  
-    def checkSignature(self, data, prefix='openid.'):
313  
-        try:
314  
-            signed = data[prefix + 'signed']
315  
-            fields = signed.split(',')
316  
-            expected_sig = self.signDict(fields, data, prefix)
317  
-            request_sig = data[prefix + 'sig']
318  
-        except KeyError:
319  
-            return False
320  
-
321  
-        return request_sig == expected_sig
171  openid/.svn/text-base/cryptutil.py.svn-base
... ...
@@ -1,171 +0,0 @@
1  
-"""Module containing a cryptographic-quality source of randomness and
2  
-other cryptographically useful functionality