docusign-esign-csharp-client icon indicating copy to clipboard operation
docusign-esign-csharp-client copied to clipboard

Docusign Setting "iat" parameter in C#

Open sameedaris opened this issue 4 years ago • 5 comments

Hello, Currently DocuSign client is setting current system time as "iat" parameter. This causes issue when system time is not correct. As this is not required parameter from DocuSign we would like to know how to set it to null ? Thanks.

sameedaris avatar May 18 '21 08:05 sameedaris

@sameedaris According to the code "iat" ie IssuedAt = DateTime.UtcNow, is set as UtcNow According to Microsoft UtcNow Gets a DateTime object that is set to the current date and time on this computer, expressed as the Coordinated Universal Time (UTC). I would advise making sure your server time is correctly synced You can not set it to NULL, this value will be assigned at run time based on your server time

ivdinkovds avatar May 18 '21 16:05 ivdinkovds

This is reply from docusign support:

After reviewing with my internal team, this error appears to be caused by an incorrect server time. In order to resolve, your client will need to ensure their server clock is correct & synced. Otherwise, should the time be correct, it may help to manually build in some slack such as "current time - 5 minutes" or not setting the 'iat' parameter as it is not required, unlike the 'exp' parameter which is required.

sameedaris avatar May 19 '21 12:05 sameedaris

@sameedaris RequestJWTUserToken method requires only expiration time. "iat" is set in the method itself IssuedAt = DateTime.UtcNow at run time and is using server time. You can not set it to NULL or alter it. I am really not sure what is the meaning of

manually build in some slack such as "current time - 5 minutes"

ivdinkovds avatar May 19 '21 13:05 ivdinkovds

I assume you can manually build your assertion and directly call the auth endpoint but because you have opened an issue here I guess you plan to use the SDK client

ivdinkovds avatar May 19 '21 13:05 ivdinkovds

Thanks All the help @ivdinkovds .

sameedaris avatar Sep 02 '21 17:09 sameedaris