Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: emit events for login/logout and registration #3235

Merged
merged 3 commits into from
Apr 19, 2023

Conversation

CaptainStandby
Copy link
Contributor

@CaptainStandby CaptainStandby commented Apr 13, 2023

Related issue(s)

Checklist

  • I have read the contributing guidelines.
  • I have referenced an issue containing the design document if my change
    introduces a new feature.
  • I am following the
    contributing code guidelines.
  • I have read the security policy.
  • I confirm that this pull request does not address a security
    vulnerability. If this pull request addresses a security vulnerability, I
    confirm that I got the approval (please contact
    [email protected]) from the maintainers to push
    the changes.
  • I have added tests that prove my fix is effective or that my feature
    works.
  • I have added or changed the documentation.

Further Comments

@codecov
Copy link

codecov bot commented Apr 14, 2023

Codecov Report

Merging #3235 (ca6cfae) into master (a046778) will decrease coverage by 0.02%.
The diff coverage is 96.36%.

❗ Current head ca6cfae differs from pull request most recent head 3dcd585. Consider uploading reports for the commit 3dcd585 to get more accurate results

@@            Coverage Diff             @@
##           master    #3235      +/-   ##
==========================================
- Coverage   77.92%   77.90%   -0.02%     
==========================================
  Files         319      320       +1     
  Lines       20446    20474      +28     
==========================================
+ Hits        15932    15950      +18     
- Misses       3318     3325       +7     
- Partials     1196     1199       +3     
Impacted Files Coverage Δ
selfservice/flow/logout/handler.go 77.63% <77.77%> (-5.96%) ⬇️
cmd/daemon/serve.go 89.34% <100.00%> (+0.10%) ⬆️
selfservice/flow/login/error.go 73.33% <100.00%> (+0.45%) ⬆️
selfservice/flow/login/hook.go 86.66% <100.00%> (-1.57%) ⬇️
selfservice/flow/registration/error.go 71.21% <100.00%> (+0.44%) ⬆️
selfservice/flow/registration/hook.go 73.13% <100.00%> (-1.52%) ⬇️
selfservice/hook/session_issuer.go 86.66% <100.00%> (+0.45%) ⬆️
x/events/events.go 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@CaptainStandby
Copy link
Contributor Author

I want to especially get feedback concerning the placement of the event emitting code.
I'm not 100% confident, that there are no edge cases in which an event could be missed or be emitted twice. The logical flow of the program is relative hard to follow in that regard.
I would love for @aeneasr and @zepatrik as most senior kratos devs to give this specific aspect a thorough look (thanks in advance 😄).

aeneasr
aeneasr previously approved these changes Apr 19, 2023
Copy link
Member

@aeneasr aeneasr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

design-wise this LGTM

@CaptainStandby CaptainStandby merged commit c784b7e into master Apr 19, 2023
@CaptainStandby CaptainStandby deleted the hf/metrics_1 branch April 19, 2023 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants