Azure / Azure/azure-libraries-for-java
Not able to login with ApplicationTokenCredentials.
- Langage dominant
- Java
- Étoiles
- 97
- Forks
- 102
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
**As per document:**
Using ApplicationTokenCredentials
Similarly to the file-based approach, this method requires a service principal registration, but instead of storing the credentials in a local file, the required inputs can be supplied directly via an instance of the ApplicationTokenCredentials class:
ApplicationTokenCredentials credentials = new ApplicationTokenCredentials(
client, tenant, key, AzureEnvironment.AZURE);
Azure azure = Azure.authenticate(credentials).withSubscription(subscriptionId);
or
ApplicationTokenCredentials credentials = new ApplicationTokenCredentials(
client, tenant, pfxCertificatePath, password, AzureEnvironment.AZURE);
Azure azure = Azure.authenticate(credentials).withSubscription(subscriptionId);
where client, tenant, subscriptionId, and key or pfxCertificatePath and password are strings with the required pieces of information about your service principal and subscription. The last parameter, AzureEnvironment.AZURE represents the Azure worldwide public cloud. You can use a different value out of the currently supported alternatives in the AzureEnvironment enum.
##############################################
But as mentioned above implementation of ApplicationTokenCredentials in java is:
ApplicationTokenCredentials(string clientID, sring tenantID, byte [] certificate, String certificatePassword, environment);
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par comparer les constructeurs documentés de ApplicationTokenCredentials avec l’implémentation Java présentée dans l’issue, puis reproduisez la tentative de connexion à l’aide des entrées client, tenant, certificate ou key, password, environment et subscription. La tâche est terminée lorsque le flux d’authentification documenté fonctionne ou que la documentation et l’implémentation concordent sur les entrées de constructeur prises en charge.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- azure, java
- Domaine
- authentication, cloud
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 25/100