com.cognite.client.config.TokenUrl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cdf-sdk-java Show documentation
Show all versions of cdf-sdk-java Show documentation
Java SDK for reading and writing from/to CDF resources.
package com.cognite.client.config;
import java.net.MalformedURLException;
import java.net.URL;
/**
* Helper class that can generate token URLs from well known identity providers.
*/
public class TokenUrl {
/**
* Generate a token URL for authenticating towards Azure AD as the identity provider. You
* have to specify the Azure AD tenant id as input.
*
* @param tenantId The Azure AD tenant id.
* @return The token URL for your Azure AD tenant.
* @throws MalformedURLException
*/
public static URL generateAzureAdURL(String tenantId) throws MalformedURLException {
return new URL(String.format("https://login.microsoftonline.com/%s/oauth2/v2.0/token",
tenantId));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy