Commit a8d3e3f3 authored by Ivar Derksen's avatar Ivar Derksen Committed by Sietse Ringers
Browse files

Record session's ServerName in logs

parent 452a11ea
......@@ -27,6 +27,7 @@ type LogEntry struct {
IssueCommitment *irma.IssueCommitmentMessage `json:",omitempty"`
// All session types
ServerName irma.TranslatedString `json:",omitempty"`
Version *irma.ProtocolVersion `json:",omitempty"`
Disclosure *irma.Disclosure `json:",omitempty"`
Request json.RawMessage `json:",omitempty"` // Message that started the session
......@@ -123,10 +124,11 @@ func (entry *LogEntry) GetSignedMessage() (abs *irma.SignedMessage, err error) {
func (session *session) createLogEntry(response interface{}) (*LogEntry, error) {
entry := &LogEntry{
Type: session.Action,
Time: irma.Timestamp(time.Now()),
Version: session.Version,
request: session.request,
Type: session.Action,
Time: irma.Timestamp(time.Now()),
ServerName: session.ServerName,
Version: session.Version,
request: session.request,
}
if err := entry.setSessionRequest(); err != nil {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment