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
81ca5240
Commit
81ca5240
authored
Feb 20, 2019
by
Sietse Ringers
Browse files
Add json marshal tags to irma.SessionResult for consistency with other messages
parent
f41727ca
Changes
2
Hide whitespace changes
Inline
Side-by-side
internal/servercore/helpers.go
View file @
81ca5240
...
...
@@ -43,7 +43,7 @@ func (session *session) onUpdate() {
func
(
session
*
session
)
fail
(
err
server
.
Error
,
message
string
)
*
irma
.
RemoteError
{
rerr
:=
server
.
RemoteError
(
err
,
message
)
session
.
setStatus
(
server
.
StatusCancelled
)
session
.
result
=
&
server
.
SessionResult
{
Err
:
rerr
,
Token
:
session
.
token
,
Status
:
server
.
StatusCancelled
}
session
.
result
=
&
server
.
SessionResult
{
Err
:
rerr
,
Token
:
session
.
token
,
Status
:
server
.
StatusCancelled
,
Type
:
session
.
action
}
return
rerr
}
...
...
server/api.go
View file @
81ca5240
...
...
@@ -52,13 +52,13 @@ type Configuration struct {
// SessionResult contains session information such as the session status, type, possible errors,
// and disclosed attributes or attribute-based signature if appropriate to the session type.
type
SessionResult
struct
{
Token
string
Status
Status
Type
irma
.
Action
ProofStatus
irma
.
ProofStatus
Disclosed
[]
*
irma
.
DisclosedAttribute
Signature
*
irma
.
SignedMessage
Err
*
irma
.
RemoteError
Token
string
`json:"token"`
Status
Status
`json:"status"`
Type
irma
.
Action
`json:"type"'`
ProofStatus
irma
.
ProofStatus
`json:"proofStatus,omitempty"`
Disclosed
[]
*
irma
.
DisclosedAttribute
`json:"disclosed,omitempty"`
Signature
*
irma
.
SignedMessage
`json:"signature,omitempty"`
Err
*
irma
.
RemoteError
`json:"error,omitempty"`
}
// Status is the status of an IRMA session.
...
...
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