JWT authentication problem, "PEM_read_bio:no start line"
回答済みHi,
I am trying to authenticate to Box using JWT authentication method. The private/public keys are generated according to the instruction in the Box documentation and the public key is uploaded.
The JWT that I am using is verified using http://jwt.io with the same public key as uploaded to Box. However, after sending to Box I get the following error:
OpenSSL unable to verify data: error:0906D06C:PEM routines:PEM_read_bio:no start line
I cannot find any information about this error. Does anybody know what does it mean?
The header and claim part of the JWT are probably correct; it seems that the parsing of header and claim happens before verifying signed data (I have been receiving and fixing header/claim data).
The public/private key pair is generated using OpenSSL on Linux.
-
I have found a problem, I was using Base64 instead of Base64URL encoding. Some servers are able to verify assertion regardless of the type of the encoding, Box apparently cannot.
It is written in the documentation that Base64URL encoding should be used, but maybe a note should be present about unsupported Base64 encoding, as some frameworks use this encoding as default (at least the one I am using).
サインインしてコメントを残してください。
コメント
3件のコメント