python.rst 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. Python API
  2. ==========
  3. This part of the documentation describes the interfaces for using
  4. django-browserid.
  5. .. py:module:: django_browserid
  6. .. _template-helpers:
  7. Template Helpers
  8. ----------------
  9. .. py:module:: django_browserid.helpers
  10. Template helpers are the functions used in your templates that output HTML for
  11. login and logout buttons, as well as the CSS and JS tags for making the buttons
  12. function and display correctly.
  13. .. autofunction:: browserid_info
  14. .. autofunction:: browserid_login
  15. .. autofunction:: browserid_logout
  16. .. autofunction:: browserid_js
  17. .. autofunction:: browserid_css
  18. Admin Site
  19. ----------
  20. .. py:module:: django_browserid.admin
  21. Admin site integration allows you to support login via django-browserid on the
  22. Django built-in admin interface.
  23. .. autoclass:: BrowserIDAdminSite
  24. :members: include_password_form, copy_registry
  25. .. autodata:: site
  26. :annotation:
  27. Authentication Backends
  28. -----------------------
  29. .. py:module:: django_browserid.auth
  30. There are a few different authentication backends to choose from depending on
  31. how you want to authenticate users.
  32. .. autoclass:: BrowserIDBackend
  33. :members:
  34. .. autoclass:: LocalBrowserIDBackend
  35. :show-inheritance:
  36. Views
  37. -----
  38. .. py:module:: django_browserid.views
  39. django-browserid works primarily through AJAX requests to the views below in
  40. order to log users in and out and to send information required for the login
  41. process, such as a CSRF token.
  42. .. autoclass:: Verify
  43. :members:
  44. :show-inheritance:
  45. .. autoclass:: Logout
  46. :members:
  47. :show-inheritance:
  48. .. autoclass:: CsrfToken
  49. :members:
  50. :show-inheritance:
  51. Signals
  52. -------
  53. .. py:module:: django_browserid.signals
  54. .. autodata:: user_created
  55. :annotation:
  56. Exceptions
  57. ----------
  58. .. autoexception:: django_browserid.base.BrowserIDException
  59. :members:
  60. Verification
  61. ------------
  62. .. py:currentmodule:: django_browserid
  63. The verification classes allow you to verify if a user-provided assertion is
  64. valid according to the Identity Provider specified by the user's email address.
  65. Generally you don't have to use these directly, but they are available for
  66. sites with complex authentication needs.
  67. .. autoclass:: django_browserid.RemoteVerifier
  68. :members: verify
  69. .. autoclass:: django_browserid.LocalVerifier
  70. :members: verify
  71. .. autoclass:: django_browserid.MockVerifier
  72. :members: __init__, verify
  73. .. autoclass:: django_browserid.VerificationResult
  74. :members: expires
  75. .. autofunction:: django_browserid.get_audience