Git Product home page Git Product logo

Comments (8)

brockallen avatar brockallen commented on May 30, 2024

One of the sames shows something like this. It might help get you started./

from identityserver3.membershipreboot.

parkinsona avatar parkinsona commented on May 30, 2024

I'm not sure which sample you're referring to, but here's what I was thinking.

I could override the EmailEventHandler's Process method to include the call to write the Audit Trail entry. This would allow me to do it in 1 place, while retaining the existing functionality of the EmailEventHandler.

The one thing I'm not sure on, is how I could get the currently logged in UserID into the Audit Trail.

from identityserver3.membershipreboot.

brockallen avatar brockallen commented on May 30, 2024

Sorry, I thought this was opened in the core MR repo, but the sample I was thinking about is here: https://github.com/brockallen/BrockAllen.MembershipReboot/blob/master/samples/CustomizationsSample/CustomizationsSample/Customizations.cs#L130

from identityserver3.membershipreboot.

parkinsona avatar parkinsona commented on May 30, 2024

Ahhh I see what you've got there. That makes sense.
Is there a list of all events somewhere?
Does this have all the events used: https://github.com/brockallen/BrockAllen.MembershipReboot/blob/2f1e5d4b39e6f9a567eeca634665a1551615341e/src/BrockAllen.MembershipReboot/AccountService/UserAccountEvents.cs

In that sample I see you're using HttPContext, which means I should be able to retrieve information for the user if they're logged in. For login failures, I obviously can't give them who "failed", but that's fine.

from identityserver3.membershipreboot.

brockallen avatar brockallen commented on May 30, 2024

Yep that's all the events.

-Brock

On Mar 31, 2016, at 8:52 PM, parkinsona [email protected] wrote:

Ahhh I see what you've got there. That makes sense.
Is there a list of all events somewhere?
Does this have all the events used: https://github.com/brockallen/BrockAllen.MembershipReboot/blob/2f1e5d4b39e6f9a567eeca634665a1551615341e/src/BrockAllen.MembershipReboot/AccountService/UserAccountEvents.cs

In that sample I see you're using HttPContext, which means I should be able to retrieve information for the user if they're logged in. For login failures, I obviously can't give them who "failed", but that's fine.


You are receiving this because you commented.
Reply to this email directly or view it on GitHub

from identityserver3.membershipreboot.

parkinsona avatar parkinsona commented on May 30, 2024

I have this kind of working now, but I have 2 questions

  1. Is it possible to write a handler for the UserAccountEvent class that will fire for all its children?
  2. In the sample you use: HttpContext.Current.Request.UserHostAddress. This keeps returning ::1. I tried returning claims from HttpContext, but the claim list was also empty. Am I missing something?

from identityserver3.membershipreboot.

parkinsona avatar parkinsona commented on May 30, 2024

I think I've worked out the answer to my 1st question.
The event handler will find the best match in the handlers that I have.
In my auditTrailHandlerClass I had a handler for both UserAccountEvent & PasswordChangedEvent. When I was changing the password, it was only firing the PasswordChangedEvent. To fire the UserAccountEvent I had to remove the handler for PasswordChangedEvent.
Is this only if the event handlers are within the same class?
PasswordChangedEvent is handled in the default EmailAccountEventsHandler and that has continued to work.

from identityserver3.membershipreboot.

parkinsona avatar parkinsona commented on May 30, 2024

I think I've got this worked out now.

from identityserver3.membershipreboot.

Related Issues (20)

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.