diff --git a/docs/index.rst b/docs/index.rst index ce1011b..cb4816a 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -34,6 +34,7 @@ Contents: sections/accesstokens sections/sessionmanagement sections/settings + sections/signals sections/examples sections/contribute .. diff --git a/docs/sections/signals.rst b/docs/sections/signals.rst new file mode 100644 index 0000000..959ccd1 --- /dev/null +++ b/docs/sections/signals.rst @@ -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.