Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
IRMA
Github mirrors
irmago
Commits
601cf561
Commit
601cf561
authored
Oct 18, 2019
by
Ivar Derksen
Browse files
Include clientReturnURL in session request
parent
9270a83a
Changes
3
Hide whitespace changes
Inline
Side-by-side
irmaclient/handlers.go
View file @
601cf561
...
...
@@ -83,3 +83,6 @@ func (h *keyshareEnrollmentHandler) KeyshareEnrollmentMissing(manager irma.Schem
func
(
h
*
keyshareEnrollmentHandler
)
UnsatisfiableRequest
(
request
irma
.
SessionRequest
,
ServerName
irma
.
TranslatedString
,
missing
MissingAttributes
)
{
h
.
fail
(
errors
.
New
(
"Keyshare enrollment failed: unsatisfiable"
))
}
func
(
h
*
keyshareEnrollmentHandler
)
ClientReturnURLFound
(
clientReturnURL
string
)
{
h
.
fail
(
errors
.
New
(
"Keyshare enrollment session unexpectedly found an external return url"
))
}
irmaclient/session.go
View file @
601cf561
...
...
@@ -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
)
Cancelled
()
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
!=
""
{
session
.
Handler
.
ClientReturnURLFound
(
session
.
request
.
Base
()
.
ClientReturnURL
)
}
switch
session
.
Action
{
case
irma
.
ActionDisclosing
:
session
.
Handler
.
RequestVerificationPermission
(
...
...
requests.go
View file @
601cf561
...
...
@@ -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.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment