Commit 938887a0 authored by Sietse Ringers's avatar Sietse Ringers
Browse files

Include sessiontype in server session result struct

parent 774e3097
......@@ -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))
}
......@@ -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)
......
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