@azure/msal-common 14.6.0 → 14.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/dist/account/AccountInfo.mjs +1 -1
  2. package/dist/account/AuthToken.mjs +1 -1
  3. package/dist/account/CcsCredential.mjs +1 -1
  4. package/dist/account/ClientInfo.mjs +1 -1
  5. package/dist/account/TokenClaims.mjs +1 -1
  6. package/dist/authority/Authority.d.ts +2 -2
  7. package/dist/authority/Authority.d.ts.map +1 -1
  8. package/dist/authority/Authority.mjs +8 -4
  9. package/dist/authority/Authority.mjs.map +1 -1
  10. package/dist/authority/AuthorityFactory.d.ts +12 -25
  11. package/dist/authority/AuthorityFactory.d.ts.map +1 -1
  12. package/dist/authority/AuthorityFactory.mjs +23 -44
  13. package/dist/authority/AuthorityFactory.mjs.map +1 -1
  14. package/dist/authority/AuthorityMetadata.d.ts +9 -469
  15. package/dist/authority/AuthorityMetadata.d.ts.map +1 -1
  16. package/dist/authority/AuthorityMetadata.mjs +16 -482
  17. package/dist/authority/AuthorityMetadata.mjs.map +1 -1
  18. package/dist/authority/AuthorityOptions.mjs +1 -1
  19. package/dist/authority/AuthorityType.mjs +1 -1
  20. package/dist/authority/CloudInstanceDiscoveryErrorResponse.mjs +1 -1
  21. package/dist/authority/CloudInstanceDiscoveryResponse.mjs +1 -1
  22. package/dist/authority/OpenIdConfigResponse.mjs +1 -1
  23. package/dist/authority/ProtocolMode.mjs +1 -1
  24. package/dist/authority/RegionDiscovery.mjs +1 -1
  25. package/dist/cache/CacheManager.mjs +1 -1
  26. package/dist/cache/entities/AccountEntity.mjs +1 -1
  27. package/dist/cache/entities/CacheRecord.mjs +1 -1
  28. package/dist/cache/persistence/TokenCacheContext.mjs +1 -1
  29. package/dist/cache/utils/CacheHelpers.mjs +1 -1
  30. package/dist/client/AuthorizationCodeClient.mjs +1 -1
  31. package/dist/client/BaseClient.d.ts.map +1 -1
  32. package/dist/client/BaseClient.mjs +3 -3
  33. package/dist/client/BaseClient.mjs.map +1 -1
  34. package/dist/client/RefreshTokenClient.mjs +1 -1
  35. package/dist/client/SilentFlowClient.mjs +1 -1
  36. package/dist/config/ClientConfiguration.mjs +1 -1
  37. package/dist/constants/AADServerParamKeys.mjs +1 -1
  38. package/dist/crypto/ICrypto.mjs +1 -1
  39. package/dist/crypto/JoseHeader.mjs +1 -1
  40. package/dist/crypto/PopTokenGenerator.mjs +1 -1
  41. package/dist/error/AuthError.mjs +1 -1
  42. package/dist/error/AuthErrorCodes.mjs +1 -1
  43. package/dist/error/ClientAuthError.mjs +1 -1
  44. package/dist/error/ClientAuthErrorCodes.mjs +1 -1
  45. package/dist/error/ClientConfigurationError.mjs +1 -1
  46. package/dist/error/ClientConfigurationErrorCodes.mjs +1 -1
  47. package/dist/error/InteractionRequiredAuthError.mjs +1 -1
  48. package/dist/error/InteractionRequiredAuthErrorCodes.mjs +1 -1
  49. package/dist/error/JoseHeaderError.mjs +1 -1
  50. package/dist/error/JoseHeaderErrorCodes.mjs +1 -1
  51. package/dist/error/ServerError.mjs +1 -1
  52. package/dist/index.cjs +51 -527
  53. package/dist/index.cjs.map +1 -1
  54. package/dist/index.d.ts +1 -1
  55. package/dist/index.d.ts.map +1 -1
  56. package/dist/index.mjs +3 -2
  57. package/dist/index.mjs.map +1 -1
  58. package/dist/logger/Logger.mjs +1 -1
  59. package/dist/network/INetworkModule.mjs +1 -1
  60. package/dist/network/NetworkManager.mjs +1 -1
  61. package/dist/network/ThrottlingUtils.mjs +1 -1
  62. package/dist/packageMetadata.d.ts +1 -1
  63. package/dist/packageMetadata.mjs +2 -2
  64. package/dist/request/AuthenticationHeaderParser.mjs +1 -1
  65. package/dist/request/RequestParameterBuilder.mjs +1 -1
  66. package/dist/request/RequestValidator.mjs +1 -1
  67. package/dist/request/ScopeSet.mjs +1 -1
  68. package/dist/response/ResponseHandler.mjs +1 -1
  69. package/dist/telemetry/performance/PerformanceClient.mjs +1 -1
  70. package/dist/telemetry/performance/PerformanceEvent.mjs +1 -1
  71. package/dist/telemetry/performance/StubPerformanceClient.mjs +1 -1
  72. package/dist/telemetry/server/ServerTelemetryManager.mjs +1 -1
  73. package/dist/url/UrlString.mjs +1 -1
  74. package/dist/utils/Constants.mjs +1 -1
  75. package/dist/utils/FunctionWrappers.mjs +1 -1
  76. package/dist/utils/ProtocolUtils.mjs +1 -1
  77. package/dist/utils/StringUtils.mjs +1 -1
  78. package/dist/utils/TimeUtils.mjs +1 -1
  79. package/dist/utils/UrlUtils.mjs +1 -1
  80. package/package.json +1 -1
  81. package/src/authority/Authority.ts +12 -5
  82. package/src/authority/AuthorityFactory.ts +48 -92
  83. package/src/authority/AuthorityMetadata.ts +23 -526
  84. package/src/client/BaseClient.ts +10 -11
  85. package/src/index.ts +1 -1
  86. package/src/packageMetadata.ts +1 -1
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! @azure/msal-common v14.6.0 2024-01-09 */
1
+ /*! @azure/msal-common v14.6.1 2024-01-23 */
2
2
  'use strict';
3
3
  'use strict';
4
4
 
@@ -943,7 +943,7 @@ class Logger {
943
943
 
944
944
  /* eslint-disable header/header */
945
945
  const name = "@azure/msal-common";
946
- const version = "14.6.0";
946
+ const version = "14.6.1";
947
947
 
948
948
  /*
949
949
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -2514,496 +2514,30 @@ class UrlString {
2514
2514
  */
2515
2515
  const rawMetdataJSON = {
2516
2516
  endpointMetadata: {
2517
- "https://login.microsoftonline.com/common/": {
2518
- token_endpoint: "https://login.microsoftonline.com/common/oauth2/v2.0/token",
2519
- token_endpoint_auth_methods_supported: [
2520
- "client_secret_post",
2521
- "private_key_jwt",
2522
- "client_secret_basic",
2523
- ],
2524
- jwks_uri: "https://login.microsoftonline.com/common/discovery/v2.0/keys",
2525
- response_modes_supported: ["query", "fragment", "form_post"],
2526
- subject_types_supported: ["pairwise"],
2527
- id_token_signing_alg_values_supported: ["RS256"],
2528
- response_types_supported: [
2529
- "code",
2530
- "id_token",
2531
- "code id_token",
2532
- "id_token token",
2533
- ],
2534
- scopes_supported: ["openid", "profile", "email", "offline_access"],
2517
+ "login.microsoftonline.com": {
2518
+ token_endpoint: "https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/token",
2519
+ jwks_uri: "https://login.microsoftonline.com/{tenantid}/discovery/v2.0/keys",
2535
2520
  issuer: "https://login.microsoftonline.com/{tenantid}/v2.0",
2536
- request_uri_parameter_supported: false,
2537
- userinfo_endpoint: "https://graph.microsoft.com/oidc/userinfo",
2538
- authorization_endpoint: "https://login.microsoftonline.com/common/oauth2/v2.0/authorize",
2539
- device_authorization_endpoint: "https://login.microsoftonline.com/common/oauth2/v2.0/devicecode",
2540
- http_logout_supported: true,
2541
- frontchannel_logout_supported: true,
2542
- end_session_endpoint: "https://login.microsoftonline.com/common/oauth2/v2.0/logout",
2543
- claims_supported: [
2544
- "sub",
2545
- "iss",
2546
- "cloud_instance_name",
2547
- "cloud_instance_host_name",
2548
- "cloud_graph_host_name",
2549
- "msgraph_host",
2550
- "aud",
2551
- "exp",
2552
- "iat",
2553
- "auth_time",
2554
- "acr",
2555
- "nonce",
2556
- "preferred_username",
2557
- "name",
2558
- "tid",
2559
- "ver",
2560
- "at_hash",
2561
- "c_hash",
2562
- "email",
2563
- ],
2564
- kerberos_endpoint: "https://login.microsoftonline.com/common/kerberos",
2565
- tenant_region_scope: null,
2566
- cloud_instance_name: "microsoftonline.com",
2567
- cloud_graph_host_name: "graph.windows.net",
2568
- msgraph_host: "graph.microsoft.com",
2569
- rbac_url: "https://pas.windows.net",
2521
+ authorization_endpoint: "https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/authorize",
2522
+ end_session_endpoint: "https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/logout",
2570
2523
  },
2571
- "https://login.chinacloudapi.cn/common/": {
2572
- token_endpoint: "https://login.chinacloudapi.cn/common/oauth2/v2.0/token",
2573
- token_endpoint_auth_methods_supported: [
2574
- "client_secret_post",
2575
- "private_key_jwt",
2576
- "client_secret_basic",
2577
- ],
2578
- jwks_uri: "https://login.chinacloudapi.cn/common/discovery/v2.0/keys",
2579
- response_modes_supported: ["query", "fragment", "form_post"],
2580
- subject_types_supported: ["pairwise"],
2581
- id_token_signing_alg_values_supported: ["RS256"],
2582
- response_types_supported: [
2583
- "code",
2584
- "id_token",
2585
- "code id_token",
2586
- "id_token token",
2587
- ],
2588
- scopes_supported: ["openid", "profile", "email", "offline_access"],
2524
+ "login.chinacloudapi.cn": {
2525
+ token_endpoint: "https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/token",
2526
+ jwks_uri: "https://login.chinacloudapi.cn/{tenantid}/discovery/v2.0/keys",
2589
2527
  issuer: "https://login.partner.microsoftonline.cn/{tenantid}/v2.0",
2590
- request_uri_parameter_supported: false,
2591
- userinfo_endpoint: "https://microsoftgraph.chinacloudapi.cn/oidc/userinfo",
2592
- authorization_endpoint: "https://login.chinacloudapi.cn/common/oauth2/v2.0/authorize",
2593
- device_authorization_endpoint: "https://login.chinacloudapi.cn/common/oauth2/v2.0/devicecode",
2594
- http_logout_supported: true,
2595
- frontchannel_logout_supported: true,
2596
- end_session_endpoint: "https://login.chinacloudapi.cn/common/oauth2/v2.0/logout",
2597
- claims_supported: [
2598
- "sub",
2599
- "iss",
2600
- "cloud_instance_name",
2601
- "cloud_instance_host_name",
2602
- "cloud_graph_host_name",
2603
- "msgraph_host",
2604
- "aud",
2605
- "exp",
2606
- "iat",
2607
- "auth_time",
2608
- "acr",
2609
- "nonce",
2610
- "preferred_username",
2611
- "name",
2612
- "tid",
2613
- "ver",
2614
- "at_hash",
2615
- "c_hash",
2616
- "email",
2617
- ],
2618
- kerberos_endpoint: "https://login.chinacloudapi.cn/common/kerberos",
2619
- tenant_region_scope: null,
2620
- cloud_instance_name: "partner.microsoftonline.cn",
2621
- cloud_graph_host_name: "graph.chinacloudapi.cn",
2622
- msgraph_host: "microsoftgraph.chinacloudapi.cn",
2623
- rbac_url: "https://pas.chinacloudapi.cn",
2528
+ authorization_endpoint: "https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/authorize",
2529
+ end_session_endpoint: "https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/logout",
2624
2530
  },
2625
- "https://login.microsoftonline.us/common/": {
2626
- token_endpoint: "https://login.microsoftonline.us/common/oauth2/v2.0/token",
2627
- token_endpoint_auth_methods_supported: [
2628
- "client_secret_post",
2629
- "private_key_jwt",
2630
- "client_secret_basic",
2631
- ],
2632
- jwks_uri: "https://login.microsoftonline.us/common/discovery/v2.0/keys",
2633
- response_modes_supported: ["query", "fragment", "form_post"],
2634
- subject_types_supported: ["pairwise"],
2635
- id_token_signing_alg_values_supported: ["RS256"],
2636
- response_types_supported: [
2637
- "code",
2638
- "id_token",
2639
- "code id_token",
2640
- "id_token token",
2641
- ],
2642
- scopes_supported: ["openid", "profile", "email", "offline_access"],
2531
+ "login.microsoftonline.us": {
2532
+ token_endpoint: "https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/token",
2533
+ jwks_uri: "https://login.microsoftonline.us/{tenantid}/discovery/v2.0/keys",
2643
2534
  issuer: "https://login.microsoftonline.us/{tenantid}/v2.0",
2644
- request_uri_parameter_supported: false,
2645
- userinfo_endpoint: "https://graph.microsoft.com/oidc/userinfo",
2646
- authorization_endpoint: "https://login.microsoftonline.us/common/oauth2/v2.0/authorize",
2647
- device_authorization_endpoint: "https://login.microsoftonline.us/common/oauth2/v2.0/devicecode",
2648
- http_logout_supported: true,
2649
- frontchannel_logout_supported: true,
2650
- end_session_endpoint: "https://login.microsoftonline.us/common/oauth2/v2.0/logout",
2651
- claims_supported: [
2652
- "sub",
2653
- "iss",
2654
- "cloud_instance_name",
2655
- "cloud_instance_host_name",
2656
- "cloud_graph_host_name",
2657
- "msgraph_host",
2658
- "aud",
2659
- "exp",
2660
- "iat",
2661
- "auth_time",
2662
- "acr",
2663
- "nonce",
2664
- "preferred_username",
2665
- "name",
2666
- "tid",
2667
- "ver",
2668
- "at_hash",
2669
- "c_hash",
2670
- "email",
2671
- ],
2672
- kerberos_endpoint: "https://login.microsoftonline.us/common/kerberos",
2673
- tenant_region_scope: null,
2674
- cloud_instance_name: "microsoftonline.us",
2675
- cloud_graph_host_name: "graph.windows.net",
2676
- msgraph_host: "graph.microsoft.com",
2677
- rbac_url: "https://pasff.usgovcloudapi.net",
2678
- },
2679
- "https://login.microsoftonline.com/consumers/": {
2680
- token_endpoint: "https://login.microsoftonline.com/consumers/oauth2/v2.0/token",
2681
- token_endpoint_auth_methods_supported: [
2682
- "client_secret_post",
2683
- "private_key_jwt",
2684
- "client_secret_basic",
2685
- ],
2686
- jwks_uri: "https://login.microsoftonline.com/consumers/discovery/v2.0/keys",
2687
- response_modes_supported: ["query", "fragment", "form_post"],
2688
- subject_types_supported: ["pairwise"],
2689
- id_token_signing_alg_values_supported: ["RS256"],
2690
- response_types_supported: [
2691
- "code",
2692
- "id_token",
2693
- "code id_token",
2694
- "id_token token",
2695
- ],
2696
- scopes_supported: ["openid", "profile", "email", "offline_access"],
2697
- issuer: "https://login.microsoftonline.com/9188040d-6c67-4c5b-b112-36a304b66dad/v2.0",
2698
- request_uri_parameter_supported: false,
2699
- userinfo_endpoint: "https://graph.microsoft.com/oidc/userinfo",
2700
- authorization_endpoint: "https://login.microsoftonline.com/consumers/oauth2/v2.0/authorize",
2701
- device_authorization_endpoint: "https://login.microsoftonline.com/consumers/oauth2/v2.0/devicecode",
2702
- http_logout_supported: true,
2703
- frontchannel_logout_supported: true,
2704
- end_session_endpoint: "https://login.microsoftonline.com/consumers/oauth2/v2.0/logout",
2705
- claims_supported: [
2706
- "sub",
2707
- "iss",
2708
- "cloud_instance_name",
2709
- "cloud_instance_host_name",
2710
- "cloud_graph_host_name",
2711
- "msgraph_host",
2712
- "aud",
2713
- "exp",
2714
- "iat",
2715
- "auth_time",
2716
- "acr",
2717
- "nonce",
2718
- "preferred_username",
2719
- "name",
2720
- "tid",
2721
- "ver",
2722
- "at_hash",
2723
- "c_hash",
2724
- "email",
2725
- ],
2726
- kerberos_endpoint: "https://login.microsoftonline.com/consumers/kerberos",
2727
- tenant_region_scope: null,
2728
- cloud_instance_name: "microsoftonline.com",
2729
- cloud_graph_host_name: "graph.windows.net",
2730
- msgraph_host: "graph.microsoft.com",
2731
- rbac_url: "https://pas.windows.net",
2732
- },
2733
- "https://login.chinacloudapi.cn/consumers/": {
2734
- token_endpoint: "https://login.chinacloudapi.cn/consumers/oauth2/v2.0/token",
2735
- token_endpoint_auth_methods_supported: [
2736
- "client_secret_post",
2737
- "private_key_jwt",
2738
- "client_secret_basic",
2739
- ],
2740
- jwks_uri: "https://login.chinacloudapi.cn/consumers/discovery/v2.0/keys",
2741
- response_modes_supported: ["query", "fragment", "form_post"],
2742
- subject_types_supported: ["pairwise"],
2743
- id_token_signing_alg_values_supported: ["RS256"],
2744
- response_types_supported: [
2745
- "code",
2746
- "id_token",
2747
- "code id_token",
2748
- "id_token token",
2749
- ],
2750
- scopes_supported: ["openid", "profile", "email", "offline_access"],
2751
- issuer: "https://login.partner.microsoftonline.cn/9188040d-6c67-4c5b-b112-36a304b66dad/v2.0",
2752
- request_uri_parameter_supported: false,
2753
- userinfo_endpoint: "https://microsoftgraph.chinacloudapi.cn/oidc/userinfo",
2754
- authorization_endpoint: "https://login.chinacloudapi.cn/consumers/oauth2/v2.0/authorize",
2755
- device_authorization_endpoint: "https://login.chinacloudapi.cn/consumers/oauth2/v2.0/devicecode",
2756
- http_logout_supported: true,
2757
- frontchannel_logout_supported: true,
2758
- end_session_endpoint: "https://login.chinacloudapi.cn/consumers/oauth2/v2.0/logout",
2759
- claims_supported: [
2760
- "sub",
2761
- "iss",
2762
- "cloud_instance_name",
2763
- "cloud_instance_host_name",
2764
- "cloud_graph_host_name",
2765
- "msgraph_host",
2766
- "aud",
2767
- "exp",
2768
- "iat",
2769
- "auth_time",
2770
- "acr",
2771
- "nonce",
2772
- "preferred_username",
2773
- "name",
2774
- "tid",
2775
- "ver",
2776
- "at_hash",
2777
- "c_hash",
2778
- "email",
2779
- ],
2780
- kerberos_endpoint: "https://login.chinacloudapi.cn/consumers/kerberos",
2781
- tenant_region_scope: null,
2782
- cloud_instance_name: "partner.microsoftonline.cn",
2783
- cloud_graph_host_name: "graph.chinacloudapi.cn",
2784
- msgraph_host: "microsoftgraph.chinacloudapi.cn",
2785
- rbac_url: "https://pas.chinacloudapi.cn",
2786
- },
2787
- "https://login.microsoftonline.us/consumers/": {
2788
- token_endpoint: "https://login.microsoftonline.us/consumers/oauth2/v2.0/token",
2789
- token_endpoint_auth_methods_supported: [
2790
- "client_secret_post",
2791
- "private_key_jwt",
2792
- "client_secret_basic",
2793
- ],
2794
- jwks_uri: "https://login.microsoftonline.us/consumers/discovery/v2.0/keys",
2795
- response_modes_supported: ["query", "fragment", "form_post"],
2796
- subject_types_supported: ["pairwise"],
2797
- id_token_signing_alg_values_supported: ["RS256"],
2798
- response_types_supported: [
2799
- "code",
2800
- "id_token",
2801
- "code id_token",
2802
- "id_token token",
2803
- ],
2804
- scopes_supported: ["openid", "profile", "email", "offline_access"],
2805
- issuer: "https://login.microsoftonline.us/9188040d-6c67-4c5b-b112-36a304b66dad/v2.0",
2806
- request_uri_parameter_supported: false,
2807
- userinfo_endpoint: "https://graph.microsoft.com/oidc/userinfo",
2808
- authorization_endpoint: "https://login.microsoftonline.us/consumers/oauth2/v2.0/authorize",
2809
- device_authorization_endpoint: "https://login.microsoftonline.us/consumers/oauth2/v2.0/devicecode",
2810
- http_logout_supported: true,
2811
- frontchannel_logout_supported: true,
2812
- end_session_endpoint: "https://login.microsoftonline.us/consumers/oauth2/v2.0/logout",
2813
- claims_supported: [
2814
- "sub",
2815
- "iss",
2816
- "cloud_instance_name",
2817
- "cloud_instance_host_name",
2818
- "cloud_graph_host_name",
2819
- "msgraph_host",
2820
- "aud",
2821
- "exp",
2822
- "iat",
2823
- "auth_time",
2824
- "acr",
2825
- "nonce",
2826
- "preferred_username",
2827
- "name",
2828
- "tid",
2829
- "ver",
2830
- "at_hash",
2831
- "c_hash",
2832
- "email",
2833
- ],
2834
- kerberos_endpoint: "https://login.microsoftonline.us/consumers/kerberos",
2835
- tenant_region_scope: null,
2836
- cloud_instance_name: "microsoftonline.us",
2837
- cloud_graph_host_name: "graph.windows.net",
2838
- msgraph_host: "graph.microsoft.com",
2839
- rbac_url: "https://pasff.usgovcloudapi.net",
2840
- },
2841
- "https://login.microsoftonline.com/organizations/": {
2842
- token_endpoint: "https://login.microsoftonline.com/organizations/oauth2/v2.0/token",
2843
- token_endpoint_auth_methods_supported: [
2844
- "client_secret_post",
2845
- "private_key_jwt",
2846
- "client_secret_basic",
2847
- ],
2848
- jwks_uri: "https://login.microsoftonline.com/organizations/discovery/v2.0/keys",
2849
- response_modes_supported: ["query", "fragment", "form_post"],
2850
- subject_types_supported: ["pairwise"],
2851
- id_token_signing_alg_values_supported: ["RS256"],
2852
- response_types_supported: [
2853
- "code",
2854
- "id_token",
2855
- "code id_token",
2856
- "id_token token",
2857
- ],
2858
- scopes_supported: ["openid", "profile", "email", "offline_access"],
2859
- issuer: "https://login.microsoftonline.com/{tenantid}/v2.0",
2860
- request_uri_parameter_supported: false,
2861
- userinfo_endpoint: "https://graph.microsoft.com/oidc/userinfo",
2862
- authorization_endpoint: "https://login.microsoftonline.com/organizations/oauth2/v2.0/authorize",
2863
- device_authorization_endpoint: "https://login.microsoftonline.com/organizations/oauth2/v2.0/devicecode",
2864
- http_logout_supported: true,
2865
- frontchannel_logout_supported: true,
2866
- end_session_endpoint: "https://login.microsoftonline.com/organizations/oauth2/v2.0/logout",
2867
- claims_supported: [
2868
- "sub",
2869
- "iss",
2870
- "cloud_instance_name",
2871
- "cloud_instance_host_name",
2872
- "cloud_graph_host_name",
2873
- "msgraph_host",
2874
- "aud",
2875
- "exp",
2876
- "iat",
2877
- "auth_time",
2878
- "acr",
2879
- "nonce",
2880
- "preferred_username",
2881
- "name",
2882
- "tid",
2883
- "ver",
2884
- "at_hash",
2885
- "c_hash",
2886
- "email",
2887
- ],
2888
- kerberos_endpoint: "https://login.microsoftonline.com/organizations/kerberos",
2889
- tenant_region_scope: null,
2890
- cloud_instance_name: "microsoftonline.com",
2891
- cloud_graph_host_name: "graph.windows.net",
2892
- msgraph_host: "graph.microsoft.com",
2893
- rbac_url: "https://pas.windows.net",
2894
- },
2895
- "https://login.chinacloudapi.cn/organizations/": {
2896
- token_endpoint: "https://login.chinacloudapi.cn/organizations/oauth2/v2.0/token",
2897
- token_endpoint_auth_methods_supported: [
2898
- "client_secret_post",
2899
- "private_key_jwt",
2900
- "client_secret_basic",
2901
- ],
2902
- jwks_uri: "https://login.chinacloudapi.cn/organizations/discovery/v2.0/keys",
2903
- response_modes_supported: ["query", "fragment", "form_post"],
2904
- subject_types_supported: ["pairwise"],
2905
- id_token_signing_alg_values_supported: ["RS256"],
2906
- response_types_supported: [
2907
- "code",
2908
- "id_token",
2909
- "code id_token",
2910
- "id_token token",
2911
- ],
2912
- scopes_supported: ["openid", "profile", "email", "offline_access"],
2913
- issuer: "https://login.partner.microsoftonline.cn/{tenantid}/v2.0",
2914
- request_uri_parameter_supported: false,
2915
- userinfo_endpoint: "https://microsoftgraph.chinacloudapi.cn/oidc/userinfo",
2916
- authorization_endpoint: "https://login.chinacloudapi.cn/organizations/oauth2/v2.0/authorize",
2917
- device_authorization_endpoint: "https://login.chinacloudapi.cn/organizations/oauth2/v2.0/devicecode",
2918
- http_logout_supported: true,
2919
- frontchannel_logout_supported: true,
2920
- end_session_endpoint: "https://login.chinacloudapi.cn/organizations/oauth2/v2.0/logout",
2921
- claims_supported: [
2922
- "sub",
2923
- "iss",
2924
- "cloud_instance_name",
2925
- "cloud_instance_host_name",
2926
- "cloud_graph_host_name",
2927
- "msgraph_host",
2928
- "aud",
2929
- "exp",
2930
- "iat",
2931
- "auth_time",
2932
- "acr",
2933
- "nonce",
2934
- "preferred_username",
2935
- "name",
2936
- "tid",
2937
- "ver",
2938
- "at_hash",
2939
- "c_hash",
2940
- "email",
2941
- ],
2942
- kerberos_endpoint: "https://login.chinacloudapi.cn/organizations/kerberos",
2943
- tenant_region_scope: null,
2944
- cloud_instance_name: "partner.microsoftonline.cn",
2945
- cloud_graph_host_name: "graph.chinacloudapi.cn",
2946
- msgraph_host: "microsoftgraph.chinacloudapi.cn",
2947
- rbac_url: "https://pas.chinacloudapi.cn",
2948
- },
2949
- "https://login.microsoftonline.us/organizations/": {
2950
- token_endpoint: "https://login.microsoftonline.us/organizations/oauth2/v2.0/token",
2951
- token_endpoint_auth_methods_supported: [
2952
- "client_secret_post",
2953
- "private_key_jwt",
2954
- "client_secret_basic",
2955
- ],
2956
- jwks_uri: "https://login.microsoftonline.us/organizations/discovery/v2.0/keys",
2957
- response_modes_supported: ["query", "fragment", "form_post"],
2958
- subject_types_supported: ["pairwise"],
2959
- id_token_signing_alg_values_supported: ["RS256"],
2960
- response_types_supported: [
2961
- "code",
2962
- "id_token",
2963
- "code id_token",
2964
- "id_token token",
2965
- ],
2966
- scopes_supported: ["openid", "profile", "email", "offline_access"],
2967
- issuer: "https://login.microsoftonline.us/{tenantid}/v2.0",
2968
- request_uri_parameter_supported: false,
2969
- userinfo_endpoint: "https://graph.microsoft.com/oidc/userinfo",
2970
- authorization_endpoint: "https://login.microsoftonline.us/organizations/oauth2/v2.0/authorize",
2971
- device_authorization_endpoint: "https://login.microsoftonline.us/organizations/oauth2/v2.0/devicecode",
2972
- http_logout_supported: true,
2973
- frontchannel_logout_supported: true,
2974
- end_session_endpoint: "https://login.microsoftonline.us/organizations/oauth2/v2.0/logout",
2975
- claims_supported: [
2976
- "sub",
2977
- "iss",
2978
- "cloud_instance_name",
2979
- "cloud_instance_host_name",
2980
- "cloud_graph_host_name",
2981
- "msgraph_host",
2982
- "aud",
2983
- "exp",
2984
- "iat",
2985
- "auth_time",
2986
- "acr",
2987
- "nonce",
2988
- "preferred_username",
2989
- "name",
2990
- "tid",
2991
- "ver",
2992
- "at_hash",
2993
- "c_hash",
2994
- "email",
2995
- ],
2996
- kerberos_endpoint: "https://login.microsoftonline.us/organizations/kerberos",
2997
- tenant_region_scope: null,
2998
- cloud_instance_name: "microsoftonline.us",
2999
- cloud_graph_host_name: "graph.windows.net",
3000
- msgraph_host: "graph.microsoft.com",
3001
- rbac_url: "https://pasff.usgovcloudapi.net",
2535
+ authorization_endpoint: "https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/authorize",
2536
+ end_session_endpoint: "https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/logout",
3002
2537
  },
3003
2538
  },
3004
2539
  instanceDiscoveryMetadata: {
3005
2540
  tenant_discovery_endpoint: "https://{canonicalAuthority}/v2.0/.well-known/openid-configuration",
3006
- "api-version": "1.1",
3007
2541
  metadata: [
3008
2542
  {
3009
2543
  preferred_network: "login.microsoftonline.com",
@@ -5665,7 +5199,7 @@ RegionDiscovery.IMDS_OPTIONS = {
5665
5199
  * @internal
5666
5200
  */
5667
5201
  class Authority {
5668
- constructor(authority, networkInterface, cacheManager, authorityOptions, logger, performanceClient, correlationId) {
5202
+ constructor(authority, networkInterface, cacheManager, authorityOptions, logger, correlationId, performanceClient) {
5669
5203
  this.canonicalAuthority = authority;
5670
5204
  this._canonicalAuthority.validateAsUri();
5671
5205
  this.networkInterface = networkInterface;
@@ -5902,6 +5436,10 @@ class Authority {
5902
5436
  this.updateCachedMetadata(metadataEntity, cloudDiscoverySource, {
5903
5437
  source: endpointSource,
5904
5438
  });
5439
+ this.performanceClient?.addFields({
5440
+ cloudDiscoverySource: cloudDiscoverySource,
5441
+ authorityEndpointSource: endpointSource,
5442
+ }, this.correlationId);
5905
5443
  }
5906
5444
  /**
5907
5445
  * Returns metadata entity from cache if it exists, otherwiser returns a new metadata entity built
@@ -6093,8 +5631,8 @@ class Authority {
6093
5631
  * Get OAuth endpoints for common authorities.
6094
5632
  */
6095
5633
  getEndpointMetadataFromHardcodedValues() {
6096
- if (this.canonicalAuthority in EndpointMetadata) {
6097
- return EndpointMetadata[this.canonicalAuthority];
5634
+ if (this.hostnameAndPort in EndpointMetadata) {
5635
+ return EndpointMetadata[this.hostnameAndPort];
6098
5636
  }
6099
5637
  return null;
6100
5638
  }
@@ -6486,50 +6024,36 @@ function buildStaticAuthorityOptions(authOptions) {
6486
6024
  * Copyright (c) Microsoft Corporation. All rights reserved.
6487
6025
  * Licensed under the MIT License.
6488
6026
  */
6489
- /** @internal */
6490
- class AuthorityFactory {
6491
- /**
6492
- * Create an authority object of the correct type based on the url
6493
- * Performs basic authority validation - checks to see if the authority is of a valid type (i.e. aad, b2c, adfs)
6494
- *
6495
- * Also performs endpoint discovery.
6496
- *
6497
- * @param authorityUri
6498
- * @param networkClient
6499
- * @param protocolMode
6500
- */
6501
- static async createDiscoveredInstance(authorityUri, networkClient, cacheManager, authorityOptions, logger, performanceClient, correlationId) {
6502
- performanceClient?.addQueueMeasurement(PerformanceEvents.AuthorityFactoryCreateDiscoveredInstance, correlationId);
6503
- const authorityUriFinal = Authority.transformCIAMAuthority(formatAuthorityUri(authorityUri));
6504
- // Initialize authority and perform discovery endpoint check.
6505
- const acquireTokenAuthority = AuthorityFactory.createInstance(authorityUriFinal, networkClient, cacheManager, authorityOptions, logger, performanceClient, correlationId);
6506
- try {
6507
- await invokeAsync(acquireTokenAuthority.resolveEndpointsAsync.bind(acquireTokenAuthority), PerformanceEvents.AuthorityResolveEndpointsAsync, logger, performanceClient, correlationId)();
6508
- return acquireTokenAuthority;
6509
- }
6510
- catch (e) {
6511
- throw createClientAuthError(endpointResolutionError);
6512
- }
6027
+ /**
6028
+ * Create an authority object of the correct type based on the url
6029
+ * Performs basic authority validation - checks to see if the authority is of a valid type (i.e. aad, b2c, adfs)
6030
+ *
6031
+ * Also performs endpoint discovery.
6032
+ *
6033
+ * @param authorityUri
6034
+ * @param networkClient
6035
+ * @param protocolMode
6036
+ * @internal
6037
+ */
6038
+ async function createDiscoveredInstance(authorityUri, networkClient, cacheManager, authorityOptions, logger, correlationId, performanceClient) {
6039
+ performanceClient?.addQueueMeasurement(PerformanceEvents.AuthorityFactoryCreateDiscoveredInstance, correlationId);
6040
+ const authorityUriFinal = Authority.transformCIAMAuthority(formatAuthorityUri(authorityUri));
6041
+ // Initialize authority and perform discovery endpoint check.
6042
+ const acquireTokenAuthority = new Authority(authorityUriFinal, networkClient, cacheManager, authorityOptions, logger, correlationId, performanceClient);
6043
+ try {
6044
+ await invokeAsync(acquireTokenAuthority.resolveEndpointsAsync.bind(acquireTokenAuthority), PerformanceEvents.AuthorityResolveEndpointsAsync, logger, performanceClient, correlationId)();
6045
+ return acquireTokenAuthority;
6513
6046
  }
6514
- /**
6515
- * Create an authority object of the correct type based on the url
6516
- * Performs basic authority validation - checks to see if the authority is of a valid type (i.e. aad, b2c, adfs)
6517
- *
6518
- * Does not perform endpoint discovery.
6519
- *
6520
- * @param authorityUrl
6521
- * @param networkInterface
6522
- * @param protocolMode
6523
- */
6524
- static createInstance(authorityUrl, networkInterface, cacheManager, authorityOptions, logger, performanceClient, correlationId) {
6525
- // Throw error if authority url is empty
6526
- if (!authorityUrl) {
6527
- throw createClientConfigurationError(urlEmptyError);
6528
- }
6529
- return new Authority(authorityUrl, networkInterface, cacheManager, authorityOptions, logger, performanceClient, correlationId);
6047
+ catch (e) {
6048
+ throw createClientAuthError(endpointResolutionError);
6530
6049
  }
6531
6050
  }
6532
6051
 
6052
+ var AuthorityFactory = /*#__PURE__*/Object.freeze({
6053
+ __proto__: null,
6054
+ createDiscoveredInstance: createDiscoveredInstance
6055
+ });
6056
+
6533
6057
  /*
6534
6058
  * Copyright (c) Microsoft Corporation. All rights reserved.
6535
6059
  * Licensed under the MIT License.
@@ -6615,7 +6139,7 @@ class BaseClient {
6615
6139
  async updateAuthority(cloudInstanceHostname, correlationId) {
6616
6140
  this.performanceClient?.addQueueMeasurement(PerformanceEvents.UpdateTokenEndpointAuthority, correlationId);
6617
6141
  const cloudInstanceAuthorityUri = `https://${cloudInstanceHostname}/${this.authority.tenant}/`;
6618
- const cloudInstanceAuthority = await AuthorityFactory.createDiscoveredInstance(cloudInstanceAuthorityUri, this.networkClient, this.cacheManager, this.authority.options, this.logger, this.performanceClient, correlationId);
6142
+ const cloudInstanceAuthority = await createDiscoveredInstance(cloudInstanceAuthorityUri, this.networkClient, this.cacheManager, this.authority.options, this.logger, correlationId, this.performanceClient);
6619
6143
  this.authority = cloudInstanceAuthority;
6620
6144
  }
6621
6145
  /**