Commit 0ced297e authored by Sietse Ringers's avatar Sietse Ringers
Browse files

Send PIN status events

parent bfde049d
......@@ -26,6 +26,8 @@ type keyshareSessionHandler interface {
KeyshareCancelled()
KeyshareBlocked(duration int)
KeyshareError(err error)
KeysharePin()
KeysharePinOK()
}
type keyshareSession struct {
......@@ -198,6 +200,7 @@ func startKeyshareSession(
}
if requestPin {
ks.sessionHandler.KeysharePin()
ks.VerifyPin(-1)
} else {
ks.GetCommitments()
......@@ -222,6 +225,7 @@ func (ks *keyshareSession) VerifyPin(attempts int) {
return
}
if success {
ks.sessionHandler.KeysharePinOK()
ks.GetCommitments()
return
}
......
......@@ -325,6 +325,14 @@ func (session *session) KeyshareError(err error) {
session.fail(&irma.SessionError{ErrorType: irma.ErrorKeyshare, Err: err})
}
func (session *session) KeysharePin() {
session.Handler.StatusUpdate(session.Action, irma.StatusConnected)
}
func (session *session) KeysharePinOK() {
session.Handler.StatusUpdate(session.Action, irma.StatusCommunicating)
}
type disclosureResponse string
func (session *session) sendResponse(message interface{}) {
......
Supports Markdown
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