This commit is contained in:
Rekby 2016-04-11 07:03:21 +03:00
parent 1107e337a5
commit f32c8a55e7

View file

@ -10,6 +10,7 @@ import (
"net/http"
"gopkg.in/square/go-jose.v1"
"errors"
)
type jws struct {
@ -100,6 +101,9 @@ func (j *jws) Nonce() (string, error) {
if err != nil {
return nonce, err
}
if len(j.nonces) == 0 {
return "", errors.New("Can't get nonce")
}
}
nonce, j.nonces = j.nonces[len(j.nonces)-1], j.nonces[:len(j.nonces)-1]