diff --git a/auth/services/irma/signer.go b/auth/services/irma/signer.go index 936b73c75e..6d8316c3ba 100644 --- a/auth/services/irma/signer.go +++ b/auth/services/irma/signer.go @@ -102,10 +102,11 @@ func (v Signer) StartSigningSession(contract contract.Contract, _ map[string]int } // Start an IRMA session + // The empty string for requestor parameter is used because the nuts-node acts as a single requestor sessionPointer, token, _, err := v.sessionHandler.StartSession(signatureRequest, func(result *server.SessionResult) { log.Logger().Debug("Session done") log.Logger().Trace(server.ToJson(result)) - }) + }, "") if err != nil { return nil, fmt.Errorf("error while creating session: %w", err) } @@ -216,6 +217,7 @@ func printQrCode(qrcode string) { // signingSessionHandler is an abstraction for the Irma Server, mainly for enabling better testing type signingSessionHandler interface { GetSessionResult(token irmago.RequestorToken) (*server.SessionResult, error) - StartSession(request interface{}, handler server.SessionHandler) (*irmago.Qr, irmago.RequestorToken, *irmago.FrontendSessionRequest, error) + // StartSession starts an IRMA session. The requestor parameter identifies the party requesting the session. + StartSession(request interface{}, handler server.SessionHandler, requestor string) (*irmago.Qr, irmago.RequestorToken, *irmago.FrontendSessionRequest, error) HandlerFunc() http.HandlerFunc } diff --git a/auth/services/irma/validator_test.go b/auth/services/irma/validator_test.go index 20ad04fdd8..219997b4c3 100644 --- a/auth/services/irma/validator_test.go +++ b/auth/services/irma/validator_test.go @@ -48,7 +48,7 @@ func (m *mockIrmaClient) GetSessionResult(token irma.RequestorToken) (*irmaserve return m.sessionResult, nil } -func (m *mockIrmaClient) StartSession(request interface{}, handler irmaservercore.SessionHandler) (*irma.Qr, irma.RequestorToken, *irma.FrontendSessionRequest, error) { +func (m *mockIrmaClient) StartSession(request interface{}, handler irmaservercore.SessionHandler, requestor string) (*irma.Qr, irma.RequestorToken, *irma.FrontendSessionRequest, error) { if m.err != nil { return nil, "", nil, m.err }