Calling a method with generic parameters in DotNet

artur_akhmartur_akhm Posts: 4Member
edited 2018-09-13 in NAV Three Tier
Hello,

I am trying to implement integrate Box API with NAV. I am using the jose-jwt library to obtain my JWTs. Hre is yhe code I am using:

CreateToken()
Init;
ConstructHeaders;
ConstructPayload;
JWT := JWT.DefaultSettings;
auth := JWT.Encode(JWTPayload,PrivateKey,JWTAlgorithm,JWTHeader,JWTSettings);

 Init()
PMXSetup.GET;
JWTPayload := JWTPayload.Dictionary;
JWTHeader := JWTHeader.Dictionary;
JWTAlgorithm := JWTAlgorithm.RS256;
privateKey:=  privateKey.X509Certificate2();
JWTSettings := JWTSettings.JwtSettings;


The problem I am facing here calling
JWT.Encode(JWTPayload,PrivateKey,JWTAlgorithm,JWTHeader,JWTSettings);

I get an error:
80w8unw0e68w.png

Here ios the method signature:
sk62cy1fk9hr.png

What am I missing to be able to call the JWT.Encode method?

Thank you.
Sign In or Register to comment.