Interface IPartnerCredentials
- All Known Implementing Classes:
ApplicationPartnerCredentials,BasePartnerCredentials,UserPartnerCredentials
public interface IPartnerCredentials
The credentials needed to access the partner service.
-
Method Summary
Modifier and Type Method Description org.joda.time.DateTimegetExpiresAt()Gets the expiry time in UTC for the token.StringgetPartnerServiceToken()Gets the token needed to authenticate with the partner service.booleanisExpired()Indicates whether the partner credentials have expired or not.voidonCredentialsRefreshNeeded(IPartnerCredentials credentials, IRequestContext context)Called when a partner credentials needs to be refreshed.
-
Method Details
-
getPartnerServiceToken
String getPartnerServiceToken()Gets the token needed to authenticate with the partner service.- Returns:
- The token needed to authenticate with the partner service.
-
getExpiresAt
org.joda.time.DateTime getExpiresAt()Gets the expiry time in UTC for the token.- Returns:
- The expiry time in UTC for the token.
-
isExpired
boolean isExpired()Indicates whether the partner credentials have expired or not.- Returns:
- true if credentials have expired; otherwise false.
-
onCredentialsRefreshNeeded
Called when a partner credentials needs to be refreshed.- Parameters:
credentials- The outdated partner credentials.context- The request context.
-