Commit eb6ac396 authored by Leon's avatar Leon Committed by Sietse Ringers

Rollback ordering of validation

parent c8f695a4
......@@ -190,16 +190,16 @@ func (s *Server) StartSession(req interface{}) (*irma.Qr, string, error) {
request := rrequest.SessionRequest()
action := request.Action()
if err := s.validateRequest(request); err != nil {
return nil, "", err
}
if action == irma.ActionIssuing {
if err := s.validateIssuanceRequest(request.(*irma.IssuanceRequest)); err != nil {
return nil, "", err
}
}
if err := s.validateRequest(request); err != nil {
return nil, "", err
}
session := s.newSession(action, rrequest)
s.conf.Logger.WithFields(logrus.Fields{"action": action, "session": session.token}).Infof("Session started")
if s.conf.Logger.IsLevelEnabled(logrus.DebugLevel) {
......
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