fix(session-coordinator): generate wildcard token for co_managed_keygen external participants
This commit is contained in:
parent
75a2470233
commit
6de545fcb9
|
|
@ -257,6 +257,19 @@ func (uc *CreateSessionUseCase) Execute(
|
||||||
if len(offlineParties) > 0 && uc.notificationService != nil {
|
if len(offlineParties) > 0 && uc.notificationService != nil {
|
||||||
uc.sendNotificationsToOfflineParties(ctx, session, offlineParties, tokens)
|
uc.sendNotificationsToOfflineParties(ctx, session, offlineParties, tokens)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// For co_managed_keygen sessions, also generate a wildcard token
|
||||||
|
// for external participants who will join dynamically via invite code
|
||||||
|
if sessionType == entities.SessionTypeCoManagedKeygen && req.PartyComposition != nil && req.PartyComposition.TemporaryCount > 0 {
|
||||||
|
wildcardToken, err := uc.tokenGen.GenerateJoinToken(session.ID.UUID(), "*", expiresIn)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
tokens["*"] = wildcardToken
|
||||||
|
logger.Info("generated wildcard token for external participants",
|
||||||
|
zap.String("session_id", session.ID.String()),
|
||||||
|
zap.Int("external_count", req.PartyComposition.TemporaryCount))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// No party pool configured - fallback to dynamic join
|
// No party pool configured - fallback to dynamic join
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue