Commit 601cf561 authored by Ivar Derksen's avatar Ivar Derksen
Browse files

Include clientReturnURL in session request

parent 9270a83a
......@@ -83,3 +83,6 @@ func (h *keyshareEnrollmentHandler) KeyshareEnrollmentMissing(manager irma.Schem
func (h *keyshareEnrollmentHandler) UnsatisfiableRequest(request irma.SessionRequest, ServerName irma.TranslatedString, missing MissingAttributes) {"Keyshare enrollment failed: unsatisfiable"))
func (h *keyshareEnrollmentHandler) ClientReturnURLFound(clientReturnURL string) {"Keyshare enrollment session unexpectedly found an external return url"))
......@@ -30,6 +30,7 @@ type PinHandler func(proceed bool, pin string)
// A Handler contains callbacks for communication to the user.
type Handler interface {
StatusUpdate(action irma.Action, status irma.Status)
ClientReturnURLFound(clientReturnURL string)
Success(result string)
Failure(err *irma.SessionError)
......@@ -309,6 +310,12 @@ func (session *session) processSessionInfo() {
go session.doSession(proceed)
session.Handler.StatusUpdate(session.Action, irma.StatusConnected)
// Handle ClientReturnURL if one is found in the session request
if session.request.Base().ClientReturnURL != "" {
switch session.Action {
case irma.ActionDisclosing:
......@@ -34,6 +34,8 @@ type BaseRequest struct {
legacy bool // Whether or not this was deserialized from a legacy (pre-condiscon) request
Type Action `json:"type,omitempty"` // Session type, only used in legacy code
ClientReturnURL string `json:"clientReturnUrl,omitempty"` // URL to proceed to when IRMA session is completed
// An AttributeCon is only satisfied if all of its containing attribute requests are satisfied.
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