use of com.microsoft.aad.msal4j.IClientCredential in project OpenUnison by TremoloSecurity.
the class AttributeChange method loadCredentials.
private void loadCredentials() throws ProvisioningException {
IClientCredential c;
try {
app = ConfidentialClientApplication.builder(clientId, ClientCredentialFactory.createFromSecret(this.clientSecret)).authority(this.authority).build();
} catch (MalformedURLException e) {
throw new ProvisioningException("Could not obtain confidential client application", e);
}
ClientCredentialParameters parameters = ClientCredentialParameters.builder(this.clientScopes).build();
azureAuthToken = app.acquireToken(parameters).join();
this.oauth2Token = azureAuthToken.accessToken();
}
Aggregations