com.microsoft.sqlserver.jdbc.SqlFedAuthToken Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mssql-jdbc Show documentation
Show all versions of mssql-jdbc Show documentation
Microsoft JDBC Driver for SQL Server.
package com.microsoft.sqlserver.jdbc;
import java.util.Date;
class SqlFedAuthToken {
final Date expiresOn;
final String accessToken;
SqlFedAuthToken(final String accessToken,
final long expiresIn) {
this.accessToken = accessToken;
Date now = new Date();
now.setTime(now.getTime() + (expiresIn * 1000));
this.expiresOn = now;
}
SqlFedAuthToken(final String accessToken,
final Date expiresOn) {
this.accessToken = accessToken;
this.expiresOn = expiresOn;
}
Date getExpiresOnDate() {
return expiresOn;
}
}