Class ApplicationPartnerCredentials
java.lang.Object
com.microsoft.store.partnercenter.extensions.BasePartnerCredentials
com.microsoft.store.partnercenter.extensions.ApplicationPartnerCredentials
- All Implemented Interfaces:
IPartnerCredentials
public class ApplicationPartnerCredentials extends BasePartnerCredentials
Partner service credentials based on Azure Active Directory application
credentials.
-
Constructor Summary
Constructors Constructor Description ApplicationPartnerCredentials(String aadApplicationId, String aadApplicationSecret, String aadApplicationDomain)Initializes a new instance of the ApplicationPartnerCredentials class.ApplicationPartnerCredentials(String aadApplicationId, String aadApplicationSecret, String aadApplicationDomain, String aadAuthorityEndpoint, String graphApiEndpoint)Initializes a new instance of the ApplicationPartnerCredentials class. -
Method Summary
Modifier and Type Method Description voidauthenticate(IRequestContext requestContext)Authenticates with the partner service.StringgetActiveDirectoryAuthority()Gets the Active Directory authentication endpoint.StringgetGraphApiEndpoint()Gets the Graph API endpoint.voidonCredentialsRefreshNeeded(IPartnerCredentials credentials, IRequestContext context)Called when a partner credentials instance needs to be refreshed.voidsetActiveDirectoryAuthority(String value)Sets the Active Directory authentication endpoint.voidsetGraphApiEndpoint(String value)Set the Graph API end point.Methods inherited from class com.microsoft.store.partnercenter.extensions.BasePartnerCredentials
authenticate, getAADToken, getClientId, getExpiresAt, getPartnerServiceToken, isExpired, setAADToken, setClientId
-
Constructor Details
-
ApplicationPartnerCredentials
public ApplicationPartnerCredentials(String aadApplicationId, String aadApplicationSecret, String aadApplicationDomain)Initializes a new instance of the ApplicationPartnerCredentials class.- Parameters:
aadApplicationId- The application identifier in Azure Active Directory.aadApplicationSecret- The application secret in Azure Active Directory.aadApplicationDomain- The application domain in Azure Active Directory.
-
ApplicationPartnerCredentials
public ApplicationPartnerCredentials(String aadApplicationId, String aadApplicationSecret, String aadApplicationDomain, String aadAuthorityEndpoint, String graphApiEndpoint)Initializes a new instance of the ApplicationPartnerCredentials class.- Parameters:
aadApplicationId- The application identifier in Azure Active Directory.aadApplicationSecret- The application secret in Azure Active Directory.aadApplicationDomain- The application domain in Azure Active Directory.aadAuthorityEndpoint- The Active Directory authority endpoint address.graphApiEndpoint- The Azure Active Directory Graph API endpoint address.
-
-
Method Details
-
getActiveDirectoryAuthority
Gets the Active Directory authentication endpoint.- Returns:
- The Active Directory authentication endpoint
-
setActiveDirectoryAuthority
Sets the Active Directory authentication endpoint.- Parameters:
value- The Active Directory authentication endpoint.
-
getGraphApiEndpoint
Gets the Graph API endpoint.- Returns:
- The Graph API endpoint.
-
setGraphApiEndpoint
Set the Graph API end point.- Parameters:
value- The Graph API endpoint
-
authenticate
Authenticates with the partner service.- Overrides:
authenticatein classBasePartnerCredentials- Parameters:
requestContext- The request context.
-
onCredentialsRefreshNeeded
Called when a partner credentials instance needs to be refreshed.- Parameters:
credentials- The outdated partner credentials.context- The request context.
-