fix: terminate usersession (#212)

This commit is contained in:
Livio Amstutz
2020-06-11 16:34:54 +02:00
committed by GitHub
parent 44d41b8d97
commit e57d4b1ed4
4 changed files with 8 additions and 6 deletions

View File

@@ -610,11 +610,11 @@ func MfaOTPRemoveAggregate(aggCreator *es_models.AggregateCreator, existing *mod
func SignOutAggregate(aggCreator *es_models.AggregateCreator, existing *model.User, agentID string) func(ctx context.Context) (*es_models.Aggregate, error) {
return func(ctx context.Context) (*es_models.Aggregate, error) {
agg, err := UserAggregate(ctx, aggCreator, existing)
agg, err := UserAggregateOverwriteContext(ctx, aggCreator, existing, existing.ResourceOwner, existing.AggregateID)
if err != nil {
return nil, err
}
return agg.AppendEvent(model.SignedOut, map[string]interface{}{"agentID": agentID})
return agg.AppendEvent(model.SignedOut, map[string]interface{}{"userAgentID": agentID})
}
}