Module com.microsoft.sqlserver.jdbc
Package com.microsoft.sqlserver.jdbc

# Class SqlAuthenticationToken

java.lang.Object
com.microsoft.sqlserver.jdbc.SqlAuthenticationToken

All Implemented Interfaces:
  `Serializable`

public class SqlAuthenticationToken extends Object implements Serializable
Provides an implementation of a SqlAuthenticationToken

See Also:
  - Serialized Form

## Constructor Summary

Constructors
Constructor
Description
`SqlAuthenticationToken(String accessToken, long expiresOn)`
Contructs a SqlAuthentication token.
`SqlAuthenticationToken(String accessToken, Date expiresOn)`
Contructs a SqlAuthentication token.

## Method Summary

Modifier and Type
Method
Description
`String`
`getAccessToken()`
Returns the access token string.
`Date`
`getExpiresOn()`
Returns the expiration date of the token.
`String`
`toString()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Constructor Details

### SqlAuthenticationToken

public SqlAuthenticationToken(String accessToken, long expiresOn)
Contructs a SqlAuthentication token.

Parameters:
  `accessToken` - The access token string.
  `expiresOn` - The expiration date in seconds since the unix epoch.

### SqlAuthenticationToken

public SqlAuthenticationToken(String accessToken, Date expiresOn)
Contructs a SqlAuthentication token.

Parameters:
  `accessToken` - The access token string.
  `expiresOn` - The expiration date.

## Method Details

### getExpiresOn

public Date getExpiresOn()
Returns the expiration date of the token.

Returns:
  The token expiration date.

### getAccessToken

public String getAccessToken()
Returns the access token string.

Returns:
  The access token.

### toString

public String toString()

Overrides:
  `toString` in class `Object`