Commit aae22efc authored by Tomas's avatar Tomas
Browse files

Add server name to UnsatisfiableRequest

parent 459ae208
...@@ -56,7 +56,7 @@ func TestManualKeyShareSession(t *testing.T) { ...@@ -56,7 +56,7 @@ func TestManualKeyShareSession(t *testing.T) {
func (sh *ManualSessionHandler) Success(irmaAction irma.Action, result string) { func (sh *ManualSessionHandler) Success(irmaAction irma.Action, result string) {
sh.c <- nil sh.c <- nil
} }
func (sh *ManualSessionHandler) UnsatisfiableRequest(irmaAction irma.Action, missingAttributes irma.AttributeDisjunctionList) { func (sh *ManualSessionHandler) UnsatisfiableRequest(irmaAction irma.Action, serverName string, missingAttributes irma.AttributeDisjunctionList) {
sh.t.Fail() sh.t.Fail()
} }
......
...@@ -30,7 +30,7 @@ type Handler interface { ...@@ -30,7 +30,7 @@ type Handler interface {
Success(action irma.Action, result string) Success(action irma.Action, result string)
Cancelled(action irma.Action) Cancelled(action irma.Action)
Failure(action irma.Action, err *irma.SessionError) Failure(action irma.Action, err *irma.SessionError)
UnsatisfiableRequest(action irma.Action, missing irma.AttributeDisjunctionList) UnsatisfiableRequest(action irma.Action, ServerName string, missing irma.AttributeDisjunctionList)
MissingKeyshareEnrollment(manager irma.SchemeManagerIdentifier) MissingKeyshareEnrollment(manager irma.SchemeManagerIdentifier)
RequestIssuancePermission(request irma.IssuanceRequest, ServerName string, callback PermissionHandler) RequestIssuancePermission(request irma.IssuanceRequest, ServerName string, callback PermissionHandler)
...@@ -228,7 +228,7 @@ func (client *Client) NewManualSession(sigrequestJSONString string, handler Hand ...@@ -228,7 +228,7 @@ func (client *Client) NewManualSession(sigrequestJSONString string, handler Hand
candidates, missing := session.client.CheckSatisfiability(session.irmaSession.ToDisclose()) candidates, missing := session.client.CheckSatisfiability(session.irmaSession.ToDisclose())
if len(missing) > 0 { if len(missing) > 0 {
session.Handler.UnsatisfiableRequest(session.Action, missing) session.Handler.UnsatisfiableRequest(session.Action, "E-mail request", missing)
// TODO: session.transport.Delete() on dialog cancel // TODO: session.transport.Delete() on dialog cancel
return return
} }
...@@ -337,7 +337,7 @@ func (session *session) start() { ...@@ -337,7 +337,7 @@ func (session *session) start() {
candidates, missing := session.client.CheckSatisfiability(session.irmaSession.ToDisclose()) candidates, missing := session.client.CheckSatisfiability(session.irmaSession.ToDisclose())
if len(missing) > 0 { if len(missing) > 0 {
session.Handler.UnsatisfiableRequest(session.Action, missing) session.Handler.UnsatisfiableRequest(session.Action, session.jwt.Requestor(), missing)
// TODO: session.transport.Delete() on dialog cancel // TODO: session.transport.Delete() on dialog cancel
return return
} }
......
...@@ -37,7 +37,7 @@ func (th TestHandler) Failure(action irma.Action, err *irma.SessionError) { ...@@ -37,7 +37,7 @@ func (th TestHandler) Failure(action irma.Action, err *irma.SessionError) {
th.t.Fatal(err) th.t.Fatal(err)
} }
} }
func (th TestHandler) UnsatisfiableRequest(action irma.Action, missing irma.AttributeDisjunctionList) { func (th TestHandler) UnsatisfiableRequest(action irma.Action, serverName string, missing irma.AttributeDisjunctionList) {
th.c <- &irma.SessionError{ th.c <- &irma.SessionError{
ErrorType: irma.ErrorType("UnsatisfiableRequest"), ErrorType: irma.ErrorType("UnsatisfiableRequest"),
} }
......
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