Support user defined auth method with configuration#975
Conversation
azure-auth-helper/src/main/java/com/microsoft/azure/auth/AzureAuthHelper.java
Outdated
Show resolved
Hide resolved
azure-maven-plugin-lib/src/main/java/com/microsoft/azure/maven/AbstractAzureMojo.java
Show resolved
Hide resolved
| @@ -67,7 +51,6 @@ public static Azure getAzureClient(AuthConfiguration auth, String subscriptionId | |||
| Log.info(String.format(SUBSCRIPTION_TEMPLATE, subscription.displayName(), subscription.subscriptionId())); | |||
There was a problem hiding this comment.
move this piece of code to abstractazuremojo and record auth type, subscription id(in another PR)
azure-auth-helper/src/main/java/com/microsoft/azure/auth/configuration/AuthType.java
Outdated
Show resolved
Hide resolved
| for (final AuthType authType : AUTH_ORDER) { | ||
| try { | ||
| result = authType.getAzureToken(authConfiguration, azureEnvironment); | ||
| if (result != null) { |
There was a problem hiding this comment.
can you call a light azure api to verify the auth credential?
Codecov Report
@@ Coverage Diff @@
## develop #975 +/- ##
=============================================
- Coverage 41.65% 41.42% -0.23%
- Complexity 778 780 +2
=============================================
Files 155 155
Lines 5587 5620 +33
Branches 784 786 +2
=============================================
+ Hits 2327 2328 +1
- Misses 3091 3124 +33
+ Partials 169 168 -1
Continue to review full report at Codecov.
|
azure-auth-helper/src/main/java/com/microsoft/azure/auth/configuration/AuthType.java
Outdated
Show resolved
Hide resolved
azure-maven-plugin-lib/src/main/java/com/microsoft/azure/maven/AbstractAzureMojo.java
Outdated
Show resolved
Hide resolved
| .filter(authTypeEnum -> StringUtils.equalsAnyIgnoreCase(authTypeEnum.name(), authType)) | ||
| .findFirst().orElse(null); | ||
| if (result == null) { | ||
| Log.warn(String.format(INVALID_AUTH_TYPE, authType, StringUtils.join(AuthType.values(), ", "))); |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #975 +/- ##
=============================================
- Coverage 41.65% 41.42% -0.23%
- Complexity 778 780 +2
=============================================
Files 155 155
Lines 5587 5620 +33
Branches 784 786 +2
=============================================
+ Hits 2327 2328 +1
- Misses 3091 3124 +33
+ Partials 169 168 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Support user defined auth method with configuration