How to use the @azure/ms-rest-nodeauth.loginWithAppServiceMSI function in @azure/ms-rest-nodeauth

To help you get started, we’ve selected a few @azure/ms-rest-nodeauth examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github tediousjs / tedious / src / state.ts View on Github external
}, callback);
        };

        if (authentication.type === 'azure-active-directory-password') {
          loginWithUsernamePassword(authentication.options.userName, authentication.options.password, {
            clientId: '7f98cb04-cd1e-40df-9140-3bf7e2cea4db',
            tokenAudience: this.connection.fedAuthInfoToken.spn
          }, getTokenFromCredentials);
        } else if (authentication.type === 'azure-active-directory-msi-vm') {
          loginWithVmMSI({
            clientId: authentication.options.clientId,
            msiEndpoint: authentication.options.msiEndpoint,
            resource: this.connection.fedAuthInfoToken.spn
          }, getTokenFromCredentials);
        } else if (authentication.type === 'azure-active-directory-msi-app-service') {
          loginWithAppServiceMSI({
            msiEndpoint: authentication.options.msiEndpoint,
            msiSecret: authentication.options.msiSecret,
            resource: this.connection.fedAuthInfoToken.spn
          }, getTokenFromCredentials);
        }
      };
github tediousjs / tedious / src / connection.js View on Github external
}, callback);
            };

            if (authentication.type === 'azure-active-directory-password') {
              loginWithUsernamePassword(authentication.options.userName, authentication.options.password, {
                clientId: '7f98cb04-cd1e-40df-9140-3bf7e2cea4db',
                tokenAudience: this.fedAuthInfoToken.spn
              }, getTokenFromCredentials);
            } else if (authentication.type === 'azure-active-directory-msi-vm') {
              loginWithVmMSI({
                clientId: authentication.options.clientId,
                msiEndpoint: authentication.options.msiEndpoint,
                resource: this.fedAuthInfoToken.spn
              }, getTokenFromCredentials);
            } else if (authentication.type === 'azure-active-directory-msi-app-service') {
              loginWithAppServiceMSI({
                clientId: authentication.options.clientId,
                msiEndpoint: authentication.options.msiEndpoint,
                msiSecret: authentication.options.msiSecret,
                resource: this.fedAuthInfoToken.spn
              }, getTokenFromCredentials);
            }
          };