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
`SqlAuthenticationToken​(String accessToken, long expiresOn)` Contructs a SqlAuthentication token.
`SqlAuthenticationToken​(String accessToken, Date expiresOn)` Contructs a SqlAuthentication token.

### Method Summary

All Methods Instance Methods Concrete Methods
`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 Detail

#### 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 Detail

#### 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`