mirror of
https://github.com/github/codeql.git
synced 2025-12-20 18:56:32 +01:00
21 lines
348 B
Go
21 lines
348 B
Go
package main
|
|
|
|
import (
|
|
"time"
|
|
|
|
jwt "github.com/golang-jwt/jwt/v4"
|
|
)
|
|
|
|
func bad() (interface{}, error) {
|
|
|
|
mySigningKey := []byte("AllYourBase")
|
|
|
|
claims := &jwt.RegisteredClaims{
|
|
ExpiresAt: jwt.NewNumericDate(time.Unix(1516239022, 0)),
|
|
Issuer: "test",
|
|
}
|
|
|
|
token := jwt.NewWithClaims(nil, claims)
|
|
return token.SignedString(mySigningKey)
|
|
}
|