PingAccess

com.pingidentity.pa.sdk.identity

com.pingidentity.pa.sdk.identity.Identity

The getTokenExpiration method was updated to use an instant instead of date.

Using the Identity#getTokenExpiration method

Before PingAccess 5.0:

Date expiration = identity.getTokenExpiration();

After PingAccess 5.0:

Date expiration = Date.from(identity.getTokenExpiration());

com.pingidentity.pa.sdk.identity.OAuthTokenMetadata

The OAuthTokenMetadata methods now use an instant instead of a date.

Using the OAuthTokenMetadata#getExpiresAt method

Before PingAccess 5.0:

Date expiresAt = metadata.getExpiresAt();

After PingAccess 5.0:

Date expiresAt = Date.from(metadata.getExpiresAt());
Using the OAuthTokenMetadata#getRetrievedAt method

Before PingAccess 5.0:

Date retrievedAt = metadata.getRetrievedAt();

After PingAccess 5.0:

Date retrievedAt = Date.from(metadata.getRetrievedAt());