title: RS256 message too long for RSA public key size - error signing JWT
body: <p>I'm using <a href="https://github.com/dgrijalva/jwt-go" rel="nofollow noreferrer">https://github.com/dgrijalva/jwt-go</a> to build a JWT using a 256-bit private PEM key. I'm using <code>SigningMethodRS256</code> to sign the JWT:</p>
  
  <pre><code>signBytes, _ := ioutil.ReadFile(privKeyPath)
  signKey, err := jwt.ParseRSAPrivateKeyFromPEM(signBytes)
  token := jwt.NewWithClaims(jwt.SigningMethodRS256, middleware.CognitoAccessTokenClaim{
      CustomArray:  []string{"testString"},
      StandardClaims: jwt.StandardClaims{
      ExpiresAt: 1500,
      },
  })
  jwtString, err := token.SignedString(signKey)
  </code></pre>
  
  <p>On the last line, I get an error when signing the jwt: <code>crypto/rsa: message too long for RSA public key size</code>. Does anyone know what causes this? The size of the pem file seems correct.</p>