Skip to content
GitLab
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
938887a0
Commit
938887a0
authored
Aug 28, 2018
by
Sietse Ringers
Browse files
Include sessiontype in server session result struct
parent
774e3097
Changes
2
Hide whitespace changes
Inline
Side-by-side
server/api.go
View file @
938887a0
...
...
@@ -25,6 +25,7 @@ type Configuration struct {
type
SessionResult
struct
{
Token
string
Status
Status
Type
irma
.
Action
ProofStatus
irma
.
ProofStatus
Disclosed
[]
*
irma
.
DisclosedAttribute
Signature
*
irma
.
SignedMessage
...
...
@@ -82,3 +83,9 @@ func WriteJson(w http.ResponseWriter, object interface{}) {
w
.
WriteHeader
(
status
)
w
.
Write
(
bts
)
}
func
WriteString
(
w
http
.
ResponseWriter
,
str
string
)
{
w
.
Header
()
.
Set
(
"Content-Type"
,
"text/plain"
)
w
.
WriteHeader
(
http
.
StatusOK
)
w
.
Write
([]
byte
(
str
))
}
server/backend/sessions.go
View file @
938887a0
...
...
@@ -120,6 +120,7 @@ func newSession(action irma.Action, request irma.SessionRequest) *session {
token
:
token
,
result
:
&
server
.
SessionResult
{
Token
:
token
,
Type
:
action
,
},
}
s
.
setStatus
(
server
.
StatusInitialized
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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