jwtKey should be []byte but string is returned (#154)

This commit is contained in:
Victor Vrantchan
2016-09-12 11:31:58 -04:00
committed by GitHub
parent ac9a38c207
commit a27752fd2c
+2 -1
View File
@@ -143,9 +143,10 @@ func setViewerContext(svc kolide.Service, ds kolide.Datastore, jwtKey string, lo
if _, ok := token.Method.(*jwt.SigningMethodHMAC); !ok {
return nil, fmt.Errorf("Unexpected signing method: %v", token.Header["alg"])
}
return jwtKey, nil
return []byte(jwtKey), nil
})
if err != nil {
logger.Log("err", err, "error-source", "setViewerContext")
return context.WithValue(ctx, "viewerContext", emptyVC())
}