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) {
func (sh *ManualSessionHandler) Success(irmaAction irma.Action, result string) {
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()
}
......
......@@ -30,7 +30,7 @@ type Handler interface {
Success(action irma.Action, result string)
Cancelled(action irma.Action)
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)
RequestIssuancePermission(request irma.IssuanceRequest, ServerName string, callback PermissionHandler)
......@@ -228,7 +228,7 @@ func (client *Client) NewManualSession(sigrequestJSONString string, handler Hand
candidates, missing := session.client.CheckSatisfiability(session.irmaSession.ToDisclose())
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
return
}
......@@ -337,7 +337,7 @@ func (session *session) start() {
candidates, missing := session.client.CheckSatisfiability(session.irmaSession.ToDisclose())
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
return
}
......
......@@ -37,7 +37,7 @@ func (th TestHandler) Failure(action irma.Action, err *irma.SessionError) {
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{
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