Comments (7)
Hi all,
in case this is still of interest
Django auth provides events for user login, logout and failed logins:
docs:
https://docs.djangoproject.com/en/dev/ref/contrib/auth/#module-django.contrib.auth.signals
see
https://stackoverflow.com/questions/1990502/django-signal-when-user-logs-in
for usage example.
Hope this helps.
ciao
GG
PS:
thanks for the module!
from django-oauth2-authcodeflow.
I may add pointer in the doc to those links. I didn’t know those events/signals.
Thanks @pinoatrome
from django-oauth2-authcodeflow.
Hi @ryhoo2
I tried to read and follow the RFCs to make this library.
It seems your code is correct, but the library does not include proper logging right now. I mean there is some logging (warning, debug) but not at places you expect. It was mainly for me to be sure it’s doing what it’s suppose to do. Logging successful login/logout was not on my radar.
You might get what you want by using a special page for logout and log yourself in that area before redirecting (or not) elsewhere.
For login, you might want to add a custom middleware that monitor if not corrected before request is handled and connected afterwards but that is tedious work.
I may add some logging to this intent in the next version. Does not seems like a lot of work. If you can propose a pull-request (or better a merge-request on gitlab repo) that could accelerate the process.
from django-oauth2-authcodeflow.
Cyrille,
Thank you for the reply.
It's not that critical for me right now, I just wanted to know if I misconfigured something or it's not yet implemented.
I'm afraid I'm not that experienced with gitlab and Python libraries coding to provide the pull-request. Maybe some day:)
Thanks again, great work!
Michal
from django-oauth2-authcodeflow.
Hi @jrd,
you are welcome.
In case you busy I'd be happy to contribute with such task, a documentation task is ideal to start within a project.
GG
from django-oauth2-authcodeflow.
Hi @pinoatrome, yes please, I’d be glad to include more documentation.
I added mere doc about this in the README.md
file, but maybe a proper documentation file would be better.
The main development is happening on gitlab. I would prefer to have pull request and issues there, but if it’s a burden for you, then here is fine too.
from django-oauth2-authcodeflow.
Hi @jrd,
sure: I'll create a new issue to enhance the documentation about auditing with an example showing how to use Django auth signals for that matter.
Ciao
GG
from django-oauth2-authcodeflow.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-oauth2-authcodeflow.