Java Code Examples for com.microsoft.azure.credentials.ApplicationTokenCredentials#domain()

The following examples show how to use com.microsoft.azure.credentials.ApplicationTokenCredentials#domain() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CbDelegatedTokenCredentials.java    From cloudbreak with Apache License 2.0 5 votes vote down vote up
public CbDelegatedTokenCredentials(ApplicationTokenCredentials applicationCredentials, String redirectUrl, Map<String, AuthenticationResult> tokens,
        String clientSecret, AuthenticationContextProvider authenticationContextProvider, CBRefreshTokenClientProvider cbRefreshTokenClientProvider) {
    super(applicationCredentials.environment(), applicationCredentials.domain());
    this.authenticationContextProvider = authenticationContextProvider;
    this.tokens = new ConcurrentHashMap<>(tokens);
    this.redirectUrl = redirectUrl;
    cbRefreshTokenClient = cbRefreshTokenClientProvider.getCBRefreshTokenClient(applicationCredentials.environment().activeDirectoryEndpoint());
    this.clientSecret = clientSecret;
    this.applicationCredentials = applicationCredentials;
}
 
Example 2
Source File: CbDelegatedTokenCredentials.java    From cloudbreak with Apache License 2.0 5 votes vote down vote up
/**
 * Initializes a new instance of the DelegatedTokenCredentials.
 *
 * @param applicationCredentials the credentials representing a service principal
 * @param redirectUrl the URL to redirect to after authentication in Active Directory
 */
public CbDelegatedTokenCredentials(ApplicationTokenCredentials applicationCredentials, String redirectUrl,
                AuthenticationContextProvider authenticationContextProvider, CBRefreshTokenClientProvider cbRefreshTokenClientProvider) {
    super(applicationCredentials.environment(), applicationCredentials.domain());
    this.authenticationContextProvider = authenticationContextProvider;
    this.applicationCredentials = applicationCredentials;
    tokens = new ConcurrentHashMap<>();
    this.redirectUrl = redirectUrl;
    cbRefreshTokenClient = cbRefreshTokenClientProvider.getCBRefreshTokenClient(applicationCredentials.environment().activeDirectoryEndpoint());
}
 
Example 3
Source File: CbDelegatedTokenCredentials.java    From cloudbreak with Apache License 2.0 5 votes vote down vote up
/**
 * Initializes a new instance of the DelegatedTokenCredentials, with a pre-acquired oauth2 authorization code.
 *
 * @param applicationCredentials the credentials representing a service principal
 * @param redirectUrl the URL to redirect to after authentication in Active Directory
 * @param authorizationCode the oauth2 authorization code
 */
public CbDelegatedTokenCredentials(ApplicationTokenCredentials applicationCredentials, String redirectUrl, String authorizationCode, String clientSecret,
                AuthenticationContextProvider authenticationContextProvider, CBRefreshTokenClientProvider cbRefreshTokenClientProvider) {
    super(applicationCredentials.environment(), applicationCredentials.domain());
    this.authenticationContextProvider = authenticationContextProvider;
    tokens = new ConcurrentHashMap<>();
    this.redirectUrl = redirectUrl;
    this.authorizationCode = authorizationCode;
    cbRefreshTokenClient = cbRefreshTokenClientProvider.getCBRefreshTokenClient(applicationCredentials.environment().activeDirectoryEndpoint());
    this.clientSecret = clientSecret;
    this.applicationCredentials = applicationCredentials;
}