加密
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
452 B

  1. package crypter
  2. import (
  3. "testing"
  4. )
  5. func Test_VerifyToken(t *testing.T) {
  6. token := "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiI5NzRjNzM1NjFhZTU0MjczIiwiaWF0IjoxNzExNzA1MTgwLCJqdGkiOiI3YzUzNGEyNi1jOTVmLTQ3NmQtYThjYS1lY2FjYTMxN2I1NDQifQ.h9JOqQOPN-xzTD7X5YPlS6YyshcixV329lEo_sX8tGw"
  7. secret := "0f82962e24be4274a3b852f2d5b26f7e"
  8. client_id := "974c73561ae54273"
  9. ret, err := VerifyToken(token, client_id, secret, 600)
  10. t.Log(ret)
  11. t.Log(err)
  12. }