Provide doc for signals.
This commit is contained in:
parent
5242f0841e
commit
db68977eb2
2 changed files with 29 additions and 0 deletions
|
@ -34,6 +34,7 @@ Contents:
|
||||||
sections/accesstokens
|
sections/accesstokens
|
||||||
sections/sessionmanagement
|
sections/sessionmanagement
|
||||||
sections/settings
|
sections/settings
|
||||||
|
sections/signals
|
||||||
sections/examples
|
sections/examples
|
||||||
sections/contribute
|
sections/contribute
|
||||||
..
|
..
|
||||||
|
|
28
docs/sections/signals.rst
Normal file
28
docs/sections/signals.rst
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
.. _signals:
|
||||||
|
|
||||||
|
Signals
|
||||||
|
#######
|
||||||
|
|
||||||
|
Use signals in your application to get notified when some actions occur.
|
||||||
|
|
||||||
|
For example::
|
||||||
|
|
||||||
|
from django.dispatch import receiver
|
||||||
|
|
||||||
|
from oidc_provider.signals import user_decline_consent
|
||||||
|
|
||||||
|
|
||||||
|
@receiver(user_decline_consent)
|
||||||
|
def my_callback(sender, **kwargs):
|
||||||
|
print(kwargs)
|
||||||
|
print('Ups! Some user has declined the consent.')
|
||||||
|
|
||||||
|
user_accept_consent
|
||||||
|
===================
|
||||||
|
|
||||||
|
Sent when a user accept the authorization page for some client.
|
||||||
|
|
||||||
|
user_decline_consent
|
||||||
|
====================
|
||||||
|
|
||||||
|
Sent when a user decline the authorization page for some client.
|
Loading…
Reference in a new issue