paolo-rossi / delphi-jose-jwt

Delphi implementation of JOSE (JSON Object Signing and Encryption) and JWT (JSON Web Token)
Apache License 2.0
448 stars 176 forks source link

Delphi-Jose-JWT on XE7 #63

Closed Scarvalhais closed 1 year ago

Scarvalhais commented 1 year ago

Is there a way to make Delphi-Jose-JWT work on Delphi XE7? I was able to install it, however, it keep returning an error when I try to creat a JWT. The error message doesn't say what is wrong, there is no error number to identify it, when it happen when it reaches the function below, and tries to pass through signature:

function TJWS.Sign: TJOSEBytes; var LAlgId: TJOSEAlgorithmId; LAlg: IJOSESigningAlgorithm; begin LAlgId.AsString := FToken.Header.Algorithm; LAlg := GetAlgorithm(LAlgId);

if not FSkipKeyValidation then LAlg.ValidateSigningKey(FKey);

Header := TBase64.URLEncode(ToJSON(FToken.Header.JSON)); Payload := TBase64.URLEncode(ToJSON(FToken.Claims.JSON)); Signature := LAlg.Sign(FKey, SigningInput);

Result := Signature; end;

paolo-rossi commented 1 year ago

Hello @Scarvalhais

sorry for the huuuge delay :-)

my intention was to install a copy of Delphi XE7 and test the issue but it's been a very busy year for work and my free-time projects suffered a bit...

Ok, back with the issue.... have you resolved in the meantime? Any progress on the exact error message?

Paolo.