BasePartnerCredentials Class

  • java.lang.Object
    • com.microsoft.store.partnercenter.extensions.BasePartnerCredentials

Implements

public abstract class BasePartnerCredentials implements IPartnerCredentials

A base implementation for partner credentials.

Constructor Summary

Constructor Description
BasePartnerCredentials(String clientId)

Initializes a new instance of the BasePartnerCredentials class.

Method Summary

Modifier and Type Method and Description
void authenticate()

Authenticates with the partner service.

void authenticate(IRequestContext requestContext)

Authenticates with the partner service.

protected AuthenticationToken getAADToken()

Gets the Azure Active Directory token.

protected java.lang.String getClientId()

Gets the Azure Active Directory client identifier.

org.joda.time.DateTime getExpiresAt()

Gets the expiry time in UTC for the token.

java.lang.String getPartnerServiceToken()

Gets the partner service token.

boolean isExpired()

Indicates whether the partner credentials have expired or not.

protected void setAADToken(AuthenticationToken value)

Sets the Azure Active Directory token.

protected void setClientId(String value)

Sets the Azure Active Directory client identifier.

Inherited Members

java.lang.Object.clone() java.lang.Object.equals(java.lang.Object) 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(long) java.lang.Object.wait(long,int)

Constructor Details

BasePartnerCredentials

public BasePartnerCredentials(String clientId)

Initializes a new instance of the BasePartnerCredentials class.

Parameters:

clientId - The Azure Active Directory client Id.

Method Details

authenticate

public void authenticate()

Authenticates with the partner service.

authenticate

public void authenticate(IRequestContext requestContext)

Authenticates with the partner service.

Parameters:

requestContext - The request context.

getAADToken

protected AuthenticationToken getAADToken()

Gets the Azure Active Directory token.

Returns:

The Azure Active Directory token.

getClientId

protected String getClientId()

Gets the Azure Active Directory client identifier.

Returns:

The Azure Active Directory client identifier.

getExpiresAt

public DateTime getExpiresAt()

Gets the expiry time in UTC for the token.

getPartnerServiceToken

public String getPartnerServiceToken()

Gets the partner service token.

Returns:

The partner service token.

isExpired

public boolean isExpired()

Indicates whether the partner credentials have expired or not.

Returns:

true if credentials have expired; otherwise, false.

setAADToken

protected void setAADToken(AuthenticationToken value)

Sets the Azure Active Directory token.

Parameters:

value - The Azure Active Directory token.

setClientId

protected void setClientId(String value)

Sets the Azure Active Directory client identifier.

Parameters:

value - The Azure Active Directory client identifier.

Applies to