Merge branch 'yageek-develop' into v1
diff --git a/jws/jwt_test.go b/jws/jwt_test.go
index a8acb10..94a6f3e 100644
--- a/jws/jwt_test.go
+++ b/jws/jwt_test.go
@@ -63,9 +63,16 @@
d := float64(time.Now().Add(1 * time.Hour).Unix())
fn := func(c Claims) error {
+
+ scopes, ok := c.Get("scopes").([]interface{})
+
+ if !ok {
+ return errors.New("Unexpected scopes type. Expected string")
+ }
+
if c.Get("name") != "Eric" &&
c.Get("admin") != true &&
- c.Get("scopes").([]string)[0] != "user.account.info" {
+ scopes[0] != "user.account.info" {
return errors.New("invalid")
}
return nil