mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 04:57:33 +00:00
feat: pass and handle auth request context for email links (#7815)
* pass and handle auth request context * tests and cleanup * cleanup
This commit is contained in:
@@ -87,6 +87,8 @@ type HumanPasswordCodeAddedEvent struct {
|
||||
URLTemplate string `json:"url_template,omitempty"`
|
||||
CodeReturned bool `json:"code_returned,omitempty"`
|
||||
TriggeredAtOrigin string `json:"triggerOrigin,omitempty"`
|
||||
// AuthRequest is only used in V1 Login UI
|
||||
AuthRequestID string `json:"authRequestID,omitempty"`
|
||||
}
|
||||
|
||||
func (e *HumanPasswordCodeAddedEvent) Payload() interface{} {
|
||||
@@ -107,8 +109,20 @@ func NewHumanPasswordCodeAddedEvent(
|
||||
code *crypto.CryptoValue,
|
||||
expiry time.Duration,
|
||||
notificationType domain.NotificationType,
|
||||
authRequestID string,
|
||||
) *HumanPasswordCodeAddedEvent {
|
||||
return NewHumanPasswordCodeAddedEventV2(ctx, aggregate, code, expiry, notificationType, "", false)
|
||||
return &HumanPasswordCodeAddedEvent{
|
||||
BaseEvent: *eventstore.NewBaseEventForPush(
|
||||
ctx,
|
||||
aggregate,
|
||||
HumanPasswordCodeAddedType,
|
||||
),
|
||||
Code: code,
|
||||
Expiry: expiry,
|
||||
NotificationType: notificationType,
|
||||
TriggeredAtOrigin: http.ComposedOrigin(ctx),
|
||||
AuthRequestID: authRequestID,
|
||||
}
|
||||
}
|
||||
|
||||
func NewHumanPasswordCodeAddedEventV2(
|
||||
|
Reference in New Issue
Block a user