SqlAuthenticationToken Class

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

Implements

java.io.Serializable

public class SqlAuthenticationToken
implements java.io.Serializable

Provides an implementation of a SqlAuthenticationToken

Constructor Summary

Constructor Description
SqlAuthenticationToken(String accessToken, Date expiresOn)

Constructs a SqlAuthentication token.

SqlAuthenticationToken(String accessToken, long expiresOn)

Constructs a SqlAuthentication token.

Method Summary

Modifier and Type Method and Description
java.lang.String getAccessToken()

Returns the access token string.

java.util.Date getExpiresOn()

Returns the expiration date of the token.

java.lang.String toString()

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Constructor Details

SqlAuthenticationToken

public SqlAuthenticationToken(String accessToken, Date expiresOn)

Constructs a SqlAuthentication token.

Parameters:

accessToken - The access token string.
expiresOn - The expiration date.

SqlAuthenticationToken

public SqlAuthenticationToken(String accessToken, long expiresOn)

Constructs a SqlAuthentication token.

Parameters:

accessToken - The access token string.
expiresOn - The expiration date in milliseconds since the unix epoch.

Method Details

getAccessToken

public String getAccessToken()

Returns the access token string.

Returns:

The access token.

getExpiresOn

public Date getExpiresOn()

Returns the expiration date of the token.

Returns:

The token expiration date.

toString

public String toString()

Overrides:

SqlAuthenticationToken.toString()

Applies to