Check if lazy loading is enabled












2














I have the following model:



public partial class User
{
// other properties

/// <summary>
/// Gets or sets user roles
/// </summary>
public virtual IList<UserRole> UserRoles
{
get => _userRoles ?? (_userRoles = UserUserRoleMappings.Select(mapping => mapping.UserRole).ToList());
}

/// <summary>
/// Gets or sets user-user role mappings
/// </summary>
public virtual ICollection<UserUserRoleMapping> UserUserRoleMappings
{
get => _userUserRoleMappings ?? (_userUserRoleMappings = new List<UserUserRoleMapping>());
protected set => _userUserRoleMappings = value;
}
}


and method of service in another library:



    public virtual User GetUserByUsername(string username)
{
if (string.IsNullOrWhiteSpace(username))
return null;

var user = _dbContext.Users
.Where(u => u.Username == username)
.FirstOrDefault();

return user;
}


it works correctly only if lazy loading is enabled:



        services.AddDbContext<DataContext>(options => options
.UseLazyLoadingProxies()
.UseSqlServer(connString));


if lazy loading is not enabled then Users property is not filled.
I want to throw an exception, if somebody try to use my service without enabled lazy loading. How to do it? I tried to check property _dbContext.ChangeTracker.LazyLoadingEnabled, but this property is always true, even I did not enable lazy loading...










share|improve this question





























    2














    I have the following model:



    public partial class User
    {
    // other properties

    /// <summary>
    /// Gets or sets user roles
    /// </summary>
    public virtual IList<UserRole> UserRoles
    {
    get => _userRoles ?? (_userRoles = UserUserRoleMappings.Select(mapping => mapping.UserRole).ToList());
    }

    /// <summary>
    /// Gets or sets user-user role mappings
    /// </summary>
    public virtual ICollection<UserUserRoleMapping> UserUserRoleMappings
    {
    get => _userUserRoleMappings ?? (_userUserRoleMappings = new List<UserUserRoleMapping>());
    protected set => _userUserRoleMappings = value;
    }
    }


    and method of service in another library:



        public virtual User GetUserByUsername(string username)
    {
    if (string.IsNullOrWhiteSpace(username))
    return null;

    var user = _dbContext.Users
    .Where(u => u.Username == username)
    .FirstOrDefault();

    return user;
    }


    it works correctly only if lazy loading is enabled:



            services.AddDbContext<DataContext>(options => options
    .UseLazyLoadingProxies()
    .UseSqlServer(connString));


    if lazy loading is not enabled then Users property is not filled.
    I want to throw an exception, if somebody try to use my service without enabled lazy loading. How to do it? I tried to check property _dbContext.ChangeTracker.LazyLoadingEnabled, but this property is always true, even I did not enable lazy loading...










    share|improve this question



























      2












      2








      2







      I have the following model:



      public partial class User
      {
      // other properties

      /// <summary>
      /// Gets or sets user roles
      /// </summary>
      public virtual IList<UserRole> UserRoles
      {
      get => _userRoles ?? (_userRoles = UserUserRoleMappings.Select(mapping => mapping.UserRole).ToList());
      }

      /// <summary>
      /// Gets or sets user-user role mappings
      /// </summary>
      public virtual ICollection<UserUserRoleMapping> UserUserRoleMappings
      {
      get => _userUserRoleMappings ?? (_userUserRoleMappings = new List<UserUserRoleMapping>());
      protected set => _userUserRoleMappings = value;
      }
      }


      and method of service in another library:



          public virtual User GetUserByUsername(string username)
      {
      if (string.IsNullOrWhiteSpace(username))
      return null;

      var user = _dbContext.Users
      .Where(u => u.Username == username)
      .FirstOrDefault();

      return user;
      }


      it works correctly only if lazy loading is enabled:



              services.AddDbContext<DataContext>(options => options
      .UseLazyLoadingProxies()
      .UseSqlServer(connString));


      if lazy loading is not enabled then Users property is not filled.
      I want to throw an exception, if somebody try to use my service without enabled lazy loading. How to do it? I tried to check property _dbContext.ChangeTracker.LazyLoadingEnabled, but this property is always true, even I did not enable lazy loading...










      share|improve this question















      I have the following model:



      public partial class User
      {
      // other properties

      /// <summary>
      /// Gets or sets user roles
      /// </summary>
      public virtual IList<UserRole> UserRoles
      {
      get => _userRoles ?? (_userRoles = UserUserRoleMappings.Select(mapping => mapping.UserRole).ToList());
      }

      /// <summary>
      /// Gets or sets user-user role mappings
      /// </summary>
      public virtual ICollection<UserUserRoleMapping> UserUserRoleMappings
      {
      get => _userUserRoleMappings ?? (_userUserRoleMappings = new List<UserUserRoleMapping>());
      protected set => _userUserRoleMappings = value;
      }
      }


      and method of service in another library:



          public virtual User GetUserByUsername(string username)
      {
      if (string.IsNullOrWhiteSpace(username))
      return null;

      var user = _dbContext.Users
      .Where(u => u.Username == username)
      .FirstOrDefault();

      return user;
      }


      it works correctly only if lazy loading is enabled:



              services.AddDbContext<DataContext>(options => options
      .UseLazyLoadingProxies()
      .UseSqlServer(connString));


      if lazy loading is not enabled then Users property is not filled.
      I want to throw an exception, if somebody try to use my service without enabled lazy loading. How to do it? I tried to check property _dbContext.ChangeTracker.LazyLoadingEnabled, but this property is always true, even I did not enable lazy loading...







      c# entity-framework-core lazy-loading entity-framework-core-2.1






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Dec 27 '18 at 20:03









      Erik Philips

      40.1k689123




      40.1k689123










      asked Dec 27 '18 at 20:01









      Oleg Sh

      2,97273678




      2,97273678
























          2 Answers
          2






          active

          oldest

          votes


















          1














          You are perhaps misinterpreting the usage of lazy loading, by mentioning that other users can use your service without lazy loading is enabled. The clients will not turn on or off lazy loading, it is up to you that implement the backend to make sure that you check for null navigation properties of EF to be existing or not.



          Lazy loading is a general feature in EF Core 2.1 that allows you to load in navigation properties only when they are accessed. These properties must be virtual and the class must not be sealed.



          Maybe you are misinterpreting the word "proxies" with a client-service call. Anyways, it is you that implement the backend that must see through that your data model is not inconsistent. Clients cannot turn lazy loading on or off.



          If you are not talking about your peers at work that will call the EF code from another layer, such as the data layer. Then you must see through that null checking is done properly. Lazy loading is usually a good thing, but you can do eager loading such as .Include in case you want to load up navigation properties.






          share|improve this answer





















          • Right now service layer works correctly only when Lazy Loading is enabled by UseLazyLoadingProxies(). If somebody else will try to use this service layer without it, I want to throw him an exception like "enable Lazy Loading, please". Is it possible?
            – Oleg Sh
            Dec 27 '18 at 20:51






          • 1




            Maybe you could override OnConfiguring in your db context and check if the property for using lazy loading is enabled through the IsConfigured method and then throw an exception. It is up to you that implement the data layer, not the client. But do note that the developer(s) implementing the service layer could override. In that case, consider sealing the DbContext class and mark the OnConfiguring method as sealed perhaps.
            – Tore Aurstad
            Dec 27 '18 at 21:02










          • I try to look at property var c = optionsBuilder.IsConfigured;, but it's always true, not depending on .UseLazyLoadingProxies()
            – Oleg Sh
            Dec 27 '18 at 21:12



















          1














          I found the solution (thank you Tore Aurstad for hint).
          I override OnConfiguring method in my DbContext :



              protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
          {
          optionsBuilder.UseLazyLoadingProxies(true);
          base.OnConfiguring(optionsBuilder);
          }


          Then we not need to use UseLazyLoadingProxies() method in startup class for enabling Lazy Loading






          share|improve this answer

















          • 1




            Nice that you found out how to make the behavior of lazy loading more deterministic. You may consider to add the "sealed" keyword to hinder users of your code to alter anything and instead add another virtual to let them customize. Also note that .net core services might inject DbContextOptions and alter stuff, so one alteration will then be to split up the OnConfiguring method into a determined, sealed part and followed up by a virtual method that the clients can customize stuff, but then they might alter lazy loading again.
            – Tore Aurstad
            Dec 27 '18 at 21:44











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53950272%2fcheck-if-lazy-loading-is-enabled%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          You are perhaps misinterpreting the usage of lazy loading, by mentioning that other users can use your service without lazy loading is enabled. The clients will not turn on or off lazy loading, it is up to you that implement the backend to make sure that you check for null navigation properties of EF to be existing or not.



          Lazy loading is a general feature in EF Core 2.1 that allows you to load in navigation properties only when they are accessed. These properties must be virtual and the class must not be sealed.



          Maybe you are misinterpreting the word "proxies" with a client-service call. Anyways, it is you that implement the backend that must see through that your data model is not inconsistent. Clients cannot turn lazy loading on or off.



          If you are not talking about your peers at work that will call the EF code from another layer, such as the data layer. Then you must see through that null checking is done properly. Lazy loading is usually a good thing, but you can do eager loading such as .Include in case you want to load up navigation properties.






          share|improve this answer





















          • Right now service layer works correctly only when Lazy Loading is enabled by UseLazyLoadingProxies(). If somebody else will try to use this service layer without it, I want to throw him an exception like "enable Lazy Loading, please". Is it possible?
            – Oleg Sh
            Dec 27 '18 at 20:51






          • 1




            Maybe you could override OnConfiguring in your db context and check if the property for using lazy loading is enabled through the IsConfigured method and then throw an exception. It is up to you that implement the data layer, not the client. But do note that the developer(s) implementing the service layer could override. In that case, consider sealing the DbContext class and mark the OnConfiguring method as sealed perhaps.
            – Tore Aurstad
            Dec 27 '18 at 21:02










          • I try to look at property var c = optionsBuilder.IsConfigured;, but it's always true, not depending on .UseLazyLoadingProxies()
            – Oleg Sh
            Dec 27 '18 at 21:12
















          1














          You are perhaps misinterpreting the usage of lazy loading, by mentioning that other users can use your service without lazy loading is enabled. The clients will not turn on or off lazy loading, it is up to you that implement the backend to make sure that you check for null navigation properties of EF to be existing or not.



          Lazy loading is a general feature in EF Core 2.1 that allows you to load in navigation properties only when they are accessed. These properties must be virtual and the class must not be sealed.



          Maybe you are misinterpreting the word "proxies" with a client-service call. Anyways, it is you that implement the backend that must see through that your data model is not inconsistent. Clients cannot turn lazy loading on or off.



          If you are not talking about your peers at work that will call the EF code from another layer, such as the data layer. Then you must see through that null checking is done properly. Lazy loading is usually a good thing, but you can do eager loading such as .Include in case you want to load up navigation properties.






          share|improve this answer





















          • Right now service layer works correctly only when Lazy Loading is enabled by UseLazyLoadingProxies(). If somebody else will try to use this service layer without it, I want to throw him an exception like "enable Lazy Loading, please". Is it possible?
            – Oleg Sh
            Dec 27 '18 at 20:51






          • 1




            Maybe you could override OnConfiguring in your db context and check if the property for using lazy loading is enabled through the IsConfigured method and then throw an exception. It is up to you that implement the data layer, not the client. But do note that the developer(s) implementing the service layer could override. In that case, consider sealing the DbContext class and mark the OnConfiguring method as sealed perhaps.
            – Tore Aurstad
            Dec 27 '18 at 21:02










          • I try to look at property var c = optionsBuilder.IsConfigured;, but it's always true, not depending on .UseLazyLoadingProxies()
            – Oleg Sh
            Dec 27 '18 at 21:12














          1












          1








          1






          You are perhaps misinterpreting the usage of lazy loading, by mentioning that other users can use your service without lazy loading is enabled. The clients will not turn on or off lazy loading, it is up to you that implement the backend to make sure that you check for null navigation properties of EF to be existing or not.



          Lazy loading is a general feature in EF Core 2.1 that allows you to load in navigation properties only when they are accessed. These properties must be virtual and the class must not be sealed.



          Maybe you are misinterpreting the word "proxies" with a client-service call. Anyways, it is you that implement the backend that must see through that your data model is not inconsistent. Clients cannot turn lazy loading on or off.



          If you are not talking about your peers at work that will call the EF code from another layer, such as the data layer. Then you must see through that null checking is done properly. Lazy loading is usually a good thing, but you can do eager loading such as .Include in case you want to load up navigation properties.






          share|improve this answer












          You are perhaps misinterpreting the usage of lazy loading, by mentioning that other users can use your service without lazy loading is enabled. The clients will not turn on or off lazy loading, it is up to you that implement the backend to make sure that you check for null navigation properties of EF to be existing or not.



          Lazy loading is a general feature in EF Core 2.1 that allows you to load in navigation properties only when they are accessed. These properties must be virtual and the class must not be sealed.



          Maybe you are misinterpreting the word "proxies" with a client-service call. Anyways, it is you that implement the backend that must see through that your data model is not inconsistent. Clients cannot turn lazy loading on or off.



          If you are not talking about your peers at work that will call the EF code from another layer, such as the data layer. Then you must see through that null checking is done properly. Lazy loading is usually a good thing, but you can do eager loading such as .Include in case you want to load up navigation properties.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Dec 27 '18 at 20:39









          Tore Aurstad

          76958




          76958












          • Right now service layer works correctly only when Lazy Loading is enabled by UseLazyLoadingProxies(). If somebody else will try to use this service layer without it, I want to throw him an exception like "enable Lazy Loading, please". Is it possible?
            – Oleg Sh
            Dec 27 '18 at 20:51






          • 1




            Maybe you could override OnConfiguring in your db context and check if the property for using lazy loading is enabled through the IsConfigured method and then throw an exception. It is up to you that implement the data layer, not the client. But do note that the developer(s) implementing the service layer could override. In that case, consider sealing the DbContext class and mark the OnConfiguring method as sealed perhaps.
            – Tore Aurstad
            Dec 27 '18 at 21:02










          • I try to look at property var c = optionsBuilder.IsConfigured;, but it's always true, not depending on .UseLazyLoadingProxies()
            – Oleg Sh
            Dec 27 '18 at 21:12


















          • Right now service layer works correctly only when Lazy Loading is enabled by UseLazyLoadingProxies(). If somebody else will try to use this service layer without it, I want to throw him an exception like "enable Lazy Loading, please". Is it possible?
            – Oleg Sh
            Dec 27 '18 at 20:51






          • 1




            Maybe you could override OnConfiguring in your db context and check if the property for using lazy loading is enabled through the IsConfigured method and then throw an exception. It is up to you that implement the data layer, not the client. But do note that the developer(s) implementing the service layer could override. In that case, consider sealing the DbContext class and mark the OnConfiguring method as sealed perhaps.
            – Tore Aurstad
            Dec 27 '18 at 21:02










          • I try to look at property var c = optionsBuilder.IsConfigured;, but it's always true, not depending on .UseLazyLoadingProxies()
            – Oleg Sh
            Dec 27 '18 at 21:12
















          Right now service layer works correctly only when Lazy Loading is enabled by UseLazyLoadingProxies(). If somebody else will try to use this service layer without it, I want to throw him an exception like "enable Lazy Loading, please". Is it possible?
          – Oleg Sh
          Dec 27 '18 at 20:51




          Right now service layer works correctly only when Lazy Loading is enabled by UseLazyLoadingProxies(). If somebody else will try to use this service layer without it, I want to throw him an exception like "enable Lazy Loading, please". Is it possible?
          – Oleg Sh
          Dec 27 '18 at 20:51




          1




          1




          Maybe you could override OnConfiguring in your db context and check if the property for using lazy loading is enabled through the IsConfigured method and then throw an exception. It is up to you that implement the data layer, not the client. But do note that the developer(s) implementing the service layer could override. In that case, consider sealing the DbContext class and mark the OnConfiguring method as sealed perhaps.
          – Tore Aurstad
          Dec 27 '18 at 21:02




          Maybe you could override OnConfiguring in your db context and check if the property for using lazy loading is enabled through the IsConfigured method and then throw an exception. It is up to you that implement the data layer, not the client. But do note that the developer(s) implementing the service layer could override. In that case, consider sealing the DbContext class and mark the OnConfiguring method as sealed perhaps.
          – Tore Aurstad
          Dec 27 '18 at 21:02












          I try to look at property var c = optionsBuilder.IsConfigured;, but it's always true, not depending on .UseLazyLoadingProxies()
          – Oleg Sh
          Dec 27 '18 at 21:12




          I try to look at property var c = optionsBuilder.IsConfigured;, but it's always true, not depending on .UseLazyLoadingProxies()
          – Oleg Sh
          Dec 27 '18 at 21:12













          1














          I found the solution (thank you Tore Aurstad for hint).
          I override OnConfiguring method in my DbContext :



              protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
          {
          optionsBuilder.UseLazyLoadingProxies(true);
          base.OnConfiguring(optionsBuilder);
          }


          Then we not need to use UseLazyLoadingProxies() method in startup class for enabling Lazy Loading






          share|improve this answer

















          • 1




            Nice that you found out how to make the behavior of lazy loading more deterministic. You may consider to add the "sealed" keyword to hinder users of your code to alter anything and instead add another virtual to let them customize. Also note that .net core services might inject DbContextOptions and alter stuff, so one alteration will then be to split up the OnConfiguring method into a determined, sealed part and followed up by a virtual method that the clients can customize stuff, but then they might alter lazy loading again.
            – Tore Aurstad
            Dec 27 '18 at 21:44
















          1














          I found the solution (thank you Tore Aurstad for hint).
          I override OnConfiguring method in my DbContext :



              protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
          {
          optionsBuilder.UseLazyLoadingProxies(true);
          base.OnConfiguring(optionsBuilder);
          }


          Then we not need to use UseLazyLoadingProxies() method in startup class for enabling Lazy Loading






          share|improve this answer

















          • 1




            Nice that you found out how to make the behavior of lazy loading more deterministic. You may consider to add the "sealed" keyword to hinder users of your code to alter anything and instead add another virtual to let them customize. Also note that .net core services might inject DbContextOptions and alter stuff, so one alteration will then be to split up the OnConfiguring method into a determined, sealed part and followed up by a virtual method that the clients can customize stuff, but then they might alter lazy loading again.
            – Tore Aurstad
            Dec 27 '18 at 21:44














          1












          1








          1






          I found the solution (thank you Tore Aurstad for hint).
          I override OnConfiguring method in my DbContext :



              protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
          {
          optionsBuilder.UseLazyLoadingProxies(true);
          base.OnConfiguring(optionsBuilder);
          }


          Then we not need to use UseLazyLoadingProxies() method in startup class for enabling Lazy Loading






          share|improve this answer












          I found the solution (thank you Tore Aurstad for hint).
          I override OnConfiguring method in my DbContext :



              protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
          {
          optionsBuilder.UseLazyLoadingProxies(true);
          base.OnConfiguring(optionsBuilder);
          }


          Then we not need to use UseLazyLoadingProxies() method in startup class for enabling Lazy Loading







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Dec 27 '18 at 21:16









          Oleg Sh

          2,97273678




          2,97273678








          • 1




            Nice that you found out how to make the behavior of lazy loading more deterministic. You may consider to add the "sealed" keyword to hinder users of your code to alter anything and instead add another virtual to let them customize. Also note that .net core services might inject DbContextOptions and alter stuff, so one alteration will then be to split up the OnConfiguring method into a determined, sealed part and followed up by a virtual method that the clients can customize stuff, but then they might alter lazy loading again.
            – Tore Aurstad
            Dec 27 '18 at 21:44














          • 1




            Nice that you found out how to make the behavior of lazy loading more deterministic. You may consider to add the "sealed" keyword to hinder users of your code to alter anything and instead add another virtual to let them customize. Also note that .net core services might inject DbContextOptions and alter stuff, so one alteration will then be to split up the OnConfiguring method into a determined, sealed part and followed up by a virtual method that the clients can customize stuff, but then they might alter lazy loading again.
            – Tore Aurstad
            Dec 27 '18 at 21:44








          1




          1




          Nice that you found out how to make the behavior of lazy loading more deterministic. You may consider to add the "sealed" keyword to hinder users of your code to alter anything and instead add another virtual to let them customize. Also note that .net core services might inject DbContextOptions and alter stuff, so one alteration will then be to split up the OnConfiguring method into a determined, sealed part and followed up by a virtual method that the clients can customize stuff, but then they might alter lazy loading again.
          – Tore Aurstad
          Dec 27 '18 at 21:44




          Nice that you found out how to make the behavior of lazy loading more deterministic. You may consider to add the "sealed" keyword to hinder users of your code to alter anything and instead add another virtual to let them customize. Also note that .net core services might inject DbContextOptions and alter stuff, so one alteration will then be to split up the OnConfiguring method into a determined, sealed part and followed up by a virtual method that the clients can customize stuff, but then they might alter lazy loading again.
          – Tore Aurstad
          Dec 27 '18 at 21:44


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53950272%2fcheck-if-lazy-loading-is-enabled%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Mossoró

          Error while reading .h5 file using the rhdf5 package in R

          Pushsharp Apns notification error: 'InvalidToken'