Ejemplo n.º 1
0
        internal ManagedIdentityCredential(string clientId, CredentialPipeline pipeline, ManagedIdentityClient client)
        {
            _clientId = clientId;

            _pipeline = pipeline;

            _client = client;
        }
Ejemplo n.º 2
0
        internal ManagedIdentityCredential(ManagedIdentityClient client)
        {
            _pipeline = client.Pipeline;

            _client = client;
        }
        internal ManagedIdentityCredential(CredentialPipeline pipeline, ManagedIdentityClient client)
        {
            _pipeline = pipeline;

            _client = client;
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Creates an instance of the ManagedIdentityCredential capable of authenticating a resource with a managed identity.
        /// </summary>
        /// <param name="clientId">
        /// The client id to authenticate for a user assigned managed identity.  More information on user assigned managed identities cam be found here:
        /// https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/overview#how-a-user-assigned-managed-identity-works-with-an-azure-vm
        /// </param>
        /// <param name="options">Options that allow to configure the management of the requests sent to the Azure Active Directory service.</param>
        public ManagedIdentityCredential(string clientId = null, IdentityClientOptions options = null)
        {
            _clientId = clientId;

            _client = (options != null) ? new ManagedIdentityClient(options) : ManagedIdentityClient.SharedClient;
        }