Git Product home page Git Product logo

Comments (7)

pinoatrome avatar pinoatrome commented on August 16, 2024 1

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.

jrd avatar jrd commented on August 16, 2024 1

I may add pointer in the doc to those links. I didn’t know those events/signals.

Thanks @pinoatrome

from django-oauth2-authcodeflow.

cpontvieux-systra avatar cpontvieux-systra commented on August 16, 2024

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.

ryhoo2 avatar ryhoo2 commented on August 16, 2024

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.

pinoatrome avatar pinoatrome commented on August 16, 2024

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.

cpontvieux-systra avatar cpontvieux-systra commented on August 16, 2024

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.

pinoatrome avatar pinoatrome commented on August 16, 2024

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 photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.