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
aae22efc
Commit
aae22efc
authored
Feb 07, 2018
by
Tomas
Browse files
Add server name to UnsatisfiableRequest
parent
459ae208
Changes
3
Show whitespace changes
Inline
Side-by-side
irmaclient/manual_session_test.go
View file @
aae22efc
...
@@ -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
()
}
}
...
...
irmaclient/session.go
View file @
aae22efc
...
@@ -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
}
}
...
...
irmaclient/session_test.go
View file @
aae22efc
...
@@ -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"
),
}
}
...
...
Write
Preview
Supports
Markdown
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