Skip to content

Commit

Permalink
Adapting to new package structure. (Azure#586)
Browse files Browse the repository at this point in the history
* Adapting to new package structure.

* using azure-common-parent parent artifactId, starting with version 1.0.0-SNAPSHOT
  • Loading branch information
anuchandy authored Mar 14, 2019
1 parent 8287c4e commit caa5840
Show file tree
Hide file tree
Showing 237 changed files with 836 additions and 886 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

21 changes: 11 additions & 10 deletions azure-client-authentication/pom.xml → azure-common-auth/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,19 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.microsoft.azure.v3</groupId>
<artifactId>autorest-clientruntime-for-java</artifactId>
<version>3.0.0-SNAPSHOT</version>
<groupId>com.azure</groupId>
<artifactId>azure-common-parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>azure-client-authentication</artifactId>
<groupId>com.azure</groupId>
<artifactId>azure-common-auth</artifactId>
<packaging>jar</packaging>
<version>3.0.0-SNAPSHOT</version>
<version>1.0.0-SNAPSHOT</version>

<name>Azure Java Client Authentication Library for AutoRest</name>
<description>This package contains the authentication connectors to Active Directory for JDK.</description>
<name>Azure Authentication Java Common Library</name>
<description>This package contains the authentication connectors to Active Directory for Azure Java Clients.</description>
<url>https://github.com/Azure/autorest-clientruntime-for-java</url>

<licenses>
Expand Down Expand Up @@ -48,9 +49,9 @@

<dependencies>
<dependency>
<groupId>com.microsoft.azure.v3</groupId>
<artifactId>azure-client-runtime</artifactId>
<version>3.0.0-SNAPSHOT</version>
<groupId>com.azure</groupId>
<artifactId>azure-common</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.microsoft.azure</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
* license information.
*/

package com.microsoft.azure.v3.credentials;
package com.azure.common.auth.credentials;

import com.microsoft.aad.adal4j.AsymmetricKeyCredential;
import com.microsoft.aad.adal4j.AuthenticationContext;
import com.microsoft.aad.adal4j.AuthenticationException;
import com.microsoft.aad.adal4j.AuthenticationResult;
import com.microsoft.aad.adal4j.ClientCredential;
import com.microsoft.azure.v3.AzureEnvironment;
import com.azure.common.AzureEnvironment;
import reactor.core.Exceptions;
import reactor.core.publisher.Mono;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@
* license information.
*/

package com.microsoft.azure.v3.credentials;
package com.azure.common.auth.credentials;

import com.azure.common.AzureEnvironment;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.google.gson.reflect.TypeToken;
import com.microsoft.azure.v3.AzureEnvironment;
import com.microsoft.azure.v3.AzureEnvironment.Endpoint;
import com.microsoft.rest.v3.annotations.Beta;
import com.microsoft.rest.v3.implementation.serializer.SerializerEncoding;
import com.microsoft.rest.v3.implementation.serializer.jackson.JacksonAdapter;
import com.azure.common.annotations.Beta;
import com.azure.common.implementation.serializer.SerializerEncoding;
import com.azure.common.implementation.serializer.jackson.JacksonAdapter;

import java.io.File;
import java.io.IOException;
Expand Down Expand Up @@ -84,11 +83,11 @@ static AuthFile parse(File file) throws IOException {
authFile.clientCertificate = authSettings.getProperty(CredentialSettings.CLIENT_CERT.toString());
authFile.clientCertificatePassword = authSettings.getProperty(CredentialSettings.CLIENT_CERT_PASS.toString());
authFile.subscriptionId = authSettings.getProperty(CredentialSettings.SUBSCRIPTION_ID.toString());
authFile.environment.endpoints().put(Endpoint.MANAGEMENT.identifier(), authSettings.getProperty(CredentialSettings.MANAGEMENT_URI.toString()));
authFile.environment.endpoints().put(Endpoint.ACTIVE_DIRECTORY.identifier(), authSettings.getProperty(CredentialSettings.AUTH_URL.toString()));
authFile.environment.endpoints().put(Endpoint.RESOURCE_MANAGER.identifier(), authSettings.getProperty(CredentialSettings.BASE_URL.toString()));
authFile.environment.endpoints().put(Endpoint.GRAPH.identifier(), authSettings.getProperty(CredentialSettings.GRAPH_URL.toString()));
authFile.environment.endpoints().put(Endpoint.KEYVAULT.identifier(), authSettings.getProperty(CredentialSettings.VAULT_SUFFIX.toString()));
authFile.environment.endpoints().put(AzureEnvironment.Endpoint.MANAGEMENT.identifier(), authSettings.getProperty(CredentialSettings.MANAGEMENT_URI.toString()));
authFile.environment.endpoints().put(AzureEnvironment.Endpoint.ACTIVE_DIRECTORY.identifier(), authSettings.getProperty(CredentialSettings.AUTH_URL.toString()));
authFile.environment.endpoints().put(AzureEnvironment.Endpoint.RESOURCE_MANAGER.identifier(), authSettings.getProperty(CredentialSettings.BASE_URL.toString()));
authFile.environment.endpoints().put(AzureEnvironment.Endpoint.GRAPH.identifier(), authSettings.getProperty(CredentialSettings.GRAPH_URL.toString()));
authFile.environment.endpoints().put(AzureEnvironment.Endpoint.KEYVAULT.identifier(), authSettings.getProperty(CredentialSettings.VAULT_SUFFIX.toString()));
}
authFile.authFilePath = file.getParent();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
* license information.
*/

package com.microsoft.azure.v3.credentials;
package com.azure.common.auth.credentials;

import com.azure.common.AzureEnvironment;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.microsoft.azure.v3.AzureEnvironment;
import com.microsoft.rest.v3.annotations.Beta;
import com.microsoft.rest.v3.implementation.serializer.jackson.JacksonAdapter;
import com.azure.common.annotations.Beta;
import com.azure.common.implementation.serializer.jackson.JacksonAdapter;
import reactor.core.Exceptions;
import reactor.core.publisher.Mono;
import reactor.core.scheduler.Schedulers;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
* license information.
*/

package com.microsoft.azure.v3.credentials;
package com.azure.common.auth.credentials;

import com.microsoft.azure.v3.AzureEnvironment;
import com.microsoft.rest.v3.annotations.Beta;
import com.azure.common.annotations.Beta;
import com.azure.common.AzureEnvironment;
import reactor.core.Exceptions;
import reactor.core.publisher.Mono;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
* license information.
*/

package com.microsoft.azure.v3.credentials;
package com.azure.common.auth.credentials;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.microsoft.aad.adal4j.AuthenticationResult;
import com.microsoft.rest.v3.annotations.Beta;
import com.azure.common.annotations.Beta;

import java.time.LocalDateTime;
import java.time.ZoneId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
* license information.
*/

package com.microsoft.azure.v3.credentials;
package com.azure.common.auth.credentials;

import com.microsoft.azure.v3.AzureEnvironment;
import com.microsoft.azure.v3.AzureEnvironment.Endpoint;
import com.azure.common.AzureEnvironment;
import com.azure.common.AzureEnvironment.Endpoint;
import com.azure.common.credentials.AsyncServiceClientCredentials;
import reactor.core.publisher.Mono;

import java.net.MalformedURLException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
* license information.
*/

package com.microsoft.azure.v3.credentials;
package com.azure.common.auth.credentials;

import com.microsoft.aad.adal4j.AsymmetricKeyCredential;
import com.microsoft.aad.adal4j.AuthenticationContext;
import com.microsoft.aad.adal4j.AuthenticationException;
import com.microsoft.aad.adal4j.AuthenticationResult;
import com.microsoft.aad.adal4j.ClientCredential;
import com.microsoft.rest.v3.annotations.Beta;
import com.azure.common.annotations.Beta;
import reactor.core.Exceptions;
import reactor.core.publisher.Mono;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*/
package com.microsoft.azure.v3.credentials;
package com.azure.common.auth.credentials;

import com.microsoft.azure.v3.AzureEnvironment;
import com.azure.common.AzureEnvironment;

/**
* Defines the configuration to be used for retrieving access token from
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*/
package com.microsoft.azure.v3.credentials;
package com.azure.common.auth.credentials;

import com.microsoft.azure.v3.AzureEnvironment;
import com.azure.common.AzureEnvironment;

/**
* Defines the configuration to be used for retrieving access token from
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
* license information.
*/

package com.microsoft.azure.v3.credentials;
package com.azure.common.auth.credentials;

import com.microsoft.azure.v3.serializer.AzureJacksonAdapter;
import com.microsoft.rest.v3.annotations.Beta;
import com.microsoft.rest.v3.implementation.serializer.SerializerEncoding;
import com.azure.common.annotations.Beta;
import com.azure.common.implementation.serializer.SerializerEncoding;
import com.azure.common.implementation.serializer.jackson.JacksonAdapter;
import reactor.core.publisher.Mono;

import java.io.BufferedReader;
Expand Down Expand Up @@ -36,7 +36,7 @@ public final class MSICredentials extends AzureTokenCredentials {
private final Lock lock = new ReentrantLock();
private final ConcurrentHashMap<String, MSIToken> cache = new ConcurrentHashMap<>();
//
private final AzureJacksonAdapter adapter = new AzureJacksonAdapter();
private final JacksonAdapter adapter = new JacksonAdapter();
private final MSIConfigurationForVirtualMachine configForVM;
private final MSIConfigurationForAppService configForAppService;
private final HostType hostType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* license information.
*/

package com.microsoft.azure.v3.credentials;
package com.azure.common.auth.credentials;

import com.fasterxml.jackson.annotation.JsonProperty;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
* license information.
*/

package com.microsoft.azure.v3.credentials;
package com.azure.common.auth.credentials;

import com.azure.common.AzureEnvironment;
import com.microsoft.aad.adal4j.AuthenticationContext;
import com.microsoft.aad.adal4j.AuthenticationResult;
import com.microsoft.azure.v3.AzureEnvironment;
import reactor.core.publisher.Mono;

import java.net.MalformedURLException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
* license information.
*/

package com.microsoft.azure.v3.credentials;
package com.azure.common.auth.credentials;

import com.microsoft.aad.adal4j.AsymmetricKeyCredential;
import com.microsoft.aad.adal4j.AuthenticationCallback;
import com.microsoft.aad.adal4j.AuthenticationResult;
import com.microsoft.rest.v3.implementation.util.Base64Util;
import com.azure.common.implementation.util.Base64Util;
import reactor.core.Exceptions;
import reactor.core.publisher.MonoSink;

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/**
* The package provides credential classes for Azure authentication purposes.
*/
package com.azure.common.auth.credentials;
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* license information.
*/

package com.microsoft.azure.v3.credentials;
package com.azure.common.auth.credentials;

import org.junit.Assert;
import org.junit.Test;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
* license information.
*/

package com.microsoft.azure.v3.credentials;
package com.azure.common.auth.credentials;

import com.azure.common.AzureEnvironment;
import com.microsoft.aad.adal4j.AuthenticationResult;
import com.microsoft.azure.v3.AzureEnvironment;
import org.junit.Assert;
import org.junit.Test;
import reactor.core.publisher.Mono;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
* license information.
*/

package com.microsoft.azure.v3.credentials.http;
package com.azure.common.auth.credentials.http;

import com.microsoft.rest.v3.http.HttpClient;
import com.microsoft.rest.v3.http.HttpRequest;
import com.microsoft.rest.v3.http.HttpResponse;
import com.microsoft.rest.v3.http.ProxyOptions;
import com.azure.common.http.HttpClient;
import com.azure.common.http.HttpRequest;
import com.azure.common.http.HttpResponse;
import com.azure.common.http.ProxyOptions;
import reactor.core.publisher.Mono;

import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
* license information.
*/

package com.microsoft.azure.v3.credentials.http;
package com.azure.common.auth.credentials.http;

import com.microsoft.rest.v3.http.HttpHeaders;
import com.microsoft.rest.v3.http.HttpResponse;
import com.microsoft.rest.v3.implementation.serializer.SerializerAdapter;
import com.microsoft.rest.v3.implementation.serializer.SerializerEncoding;
import com.microsoft.rest.v3.implementation.serializer.jackson.JacksonAdapter;
import com.azure.common.http.HttpHeaders;
import com.azure.common.http.HttpResponse;
import com.azure.common.implementation.serializer.SerializerAdapter;
import com.azure.common.implementation.serializer.SerializerEncoding;
import com.azure.common.implementation.serializer.jackson.JacksonAdapter;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import reactor.core.publisher.Flux;
Expand Down
Loading

0 comments on commit caa5840

Please sign in to comment.