IPartnerCredentials Interface

public interface IPartnerCredentials

The credentials needed to access the partner service.

Method Summary

Modifier and Type Method and Description
abstract org.joda.time.DateTime getExpiresAt()

Gets the expiry time in UTC for the token.

abstract java.lang.String getPartnerServiceToken()

Gets the token needed to authenticate with the partner service.

abstract boolean isExpired()

Indicates whether the partner credentials have expired or not.

abstract void onCredentialsRefreshNeeded(IPartnerCredentials credentials, IRequestContext context)

Called when a partner credentials needs to be refreshed.

Method Details

getExpiresAt

public abstract DateTime getExpiresAt()

Gets the expiry time in UTC for the token.

Returns:

The expiry time in UTC for the token.

getPartnerServiceToken

public abstract String getPartnerServiceToken()

Gets the token needed to authenticate with the partner service.

Returns:

The token needed to authenticate with the partner service.

isExpired

public abstract boolean isExpired()

Indicates whether the partner credentials have expired or not.

Returns:

true if credentials have expired; otherwise false.

onCredentialsRefreshNeeded

public abstract void onCredentialsRefreshNeeded(IPartnerCredentials credentials, IRequestContext context)

Called when a partner credentials needs to be refreshed.

Parameters:

credentials - The outdated partner credentials.
context - The request context.

Applies to