feat(assessment): record capture hints and keep one window per attempt
This commit is contained in:
1 parent
c975a0d506
commit
bb917bf62e
108 files changed
+6649
-139
No files matched your search
@@ -3,16 +3,19 @@ package v1
|
||||
import (
|
||||
"context"
|
||||
|
||||
httpmiddleware "lincodex/backend/internal/adapter/primary/http/middleware"
|
||||
assessmentusecase "lincodex/backend/internal/usecase/assessment"
|
||||
)
|
||||
|
||||
// assessmentRequestOrigin hands the authenticated session and the limiter key
|
||||
// of the client address to the server signals. The usecase turns them into
|
||||
// keyed digests; neither value is stored or logged.
|
||||
// assessmentRequestOrigin hands the authenticated session, the limiter key of
|
||||
// the client address, and the User-Agent to the server signals. The usecase
|
||||
// turns them into keyed digests; no value is stored or logged.
|
||||
func assessmentRequestOrigin(ctx context.Context) assessmentusecase.RequestOrigin {
|
||||
session, ok := sessionFromContext(ctx)
|
||||
if !ok {
|
||||
return assessmentusecase.RequestOrigin{}
|
||||
}
|
||||
return assessmentusecase.RequestOrigin{SessionID: session.SessionID, ClientKey: clientKey(ctx)}
|
||||
return assessmentusecase.RequestOrigin{
|
||||
SessionID: session.SessionID, ClientKey: clientKey(ctx), UserAgent: httpmiddleware.RequestUserAgent(ctx),
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user