microsoft/mssql-jdbc

Implementation bug in `SqlAuthenticationToken` constructor accepting unix epoch

konjac opened this issue · 1 comments

Driver version

12.0

SQL Server version

Any

Client Operating System

Any

JAVA/JVM version

Any

Table schema

Any

Problem description

The implementation of public SqlAuthenticationToken(String accessToken, long expiresOn) is different from its document. The doc says expiresOn is in seconds while java.util.Date is accepting timestamp in milliseconds.

Expected behavior

Convert the input expiresOn to milliseconds when creating java.util.Date

Actual behavior

Output of what you actually see.

Error message/stack trace

Complete error message and stack trace.

Any other details that can be helpful

Add any other context about the problem here.

JDBC trace logs

Provide the JDBC driver trace logs. Instructions can be found here: https://docs.microsoft.com/sql/connect/jdbc/tracing-driver-operation

Thank you for the PR, we'll take a look and get back to you with our decision.