Skip to content

Implementation bug in SqlAuthenticationToken constructor accepting unix epoch #2424

@konjac

Description

@konjac

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Closed Issues

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions