Controlling dashboard navigation in asp.net core-2.0 web application (Role Based) after getting JWT token from webapi 2.02019 Community Moderator ElectionIIS AppPoolIdentity and file system write access permissionsSimple JWT authentication in ASP.NET Core 1.0 Web APIASP.NET Core MVC Authenticate User to Azure AD then create JWT Bearer Token to call Web APIJWT and asp.net (core) web applicationASP.NET Core 2.0 JWT Validation fails with `Authorization failed for user: (null)` errorASP.net Core 2.0 JWT Token RefreshUser.Identity.Name is empty in Asp.NET Core 2.0 API ControllerGet claims from JWT token in ASP.NET Core 2.0 APIasp .net core 2.0 jwt-based authentication with membership, identity and login based on asp net users in SQL serverHow to authorize users by role in MVC Controllers using a JWT token obtained from ajax call

How to pronounce "I ♥ Huckabees"?

Is it insecure to send a password in a `curl` command?

Why do tuner card drivers fail to build after kernel update to 4.4.0-143-generic?

How are passwords stolen from companies if they only store hashes?

A single argument pattern definition applies to multiple-argument patterns?

Why is the President allowed to veto a cancellation of emergency powers?

What is a ^ b and (a & b) << 1?

Shortcut for setting origin to vertex

What are substitutions for coconut in curry?

Why did it take so long to abandon sail after steamships were demonstrated?

Simplify an interface for flexibly applying rules to periods of time

Book about superhumans hiding among normal humans

Why do newer 737s use two different styles of split winglets?

How to explain that I do not want to visit a country due to personal safety concern?

Employee lack of ownership

Violin - Can double stops be played when the strings are not next to each other?

Why does energy conservation give me the wrong answer in this inelastic collision problem?

Are all passive ability checks floors for active ability checks?

Have the tides ever turned twice on any open problem?

Why do passenger jet manufacturers design their planes with stall prevention systems?

The German vowel “a” changes to the English “i”

How well should I expect Adam to work?

How could a scammer know the apps on my phone / iTunes account?

Is there a place to find the pricing for things not mentioned in the PHB? (non-magical)



Controlling dashboard navigation in asp.net core-2.0 web application (Role Based) after getting JWT token from webapi 2.0



2019 Community Moderator ElectionIIS AppPoolIdentity and file system write access permissionsSimple JWT authentication in ASP.NET Core 1.0 Web APIASP.NET Core MVC Authenticate User to Azure AD then create JWT Bearer Token to call Web APIJWT and asp.net (core) web applicationASP.NET Core 2.0 JWT Validation fails with `Authorization failed for user: (null)` errorASP.net Core 2.0 JWT Token RefreshUser.Identity.Name is empty in Asp.NET Core 2.0 API ControllerGet claims from JWT token in ASP.NET Core 2.0 APIasp .net core 2.0 jwt-based authentication with membership, identity and login based on asp net users in SQL serverHow to authorize users by role in MVC Controllers using a JWT token obtained from ajax call










0















I have created two projects




  1. Asp.net Core 2.0 Web Application:



I am consuming webapi here and calling login method in api giving username and password.




  1. Asp.net Core 2.0 webapi:



having authentication and authorization configured and on successful login webapi returns a JWT token and User itself. Note i have secured all the routes in webapi and without token we could not access them.




Explanation




Well: Now i am confused because I have configured MVC Identity in WebApi not in Web Application so I don't have access of UserRepository and RoleRepository of Identity in Web app. How can i check that coming user is in which role and how to display different navigation based on different roles in my web application.




Use-Case




The Key Concern is, that I want to Display a dashboard with different navigation depending on user's role in Web application.



I hope i explained reasonably enough, I have searched about solution but i don't know exactly what is for me and what is not. I have seen a post they were doing something using Owin Security Cookies but my concept is week, should i really do that? if yes, could guide me an easy way of achieving my goal.










share|improve this question




























    0















    I have created two projects




    1. Asp.net Core 2.0 Web Application:



    I am consuming webapi here and calling login method in api giving username and password.




    1. Asp.net Core 2.0 webapi:



    having authentication and authorization configured and on successful login webapi returns a JWT token and User itself. Note i have secured all the routes in webapi and without token we could not access them.




    Explanation




    Well: Now i am confused because I have configured MVC Identity in WebApi not in Web Application so I don't have access of UserRepository and RoleRepository of Identity in Web app. How can i check that coming user is in which role and how to display different navigation based on different roles in my web application.




    Use-Case




    The Key Concern is, that I want to Display a dashboard with different navigation depending on user's role in Web application.



    I hope i explained reasonably enough, I have searched about solution but i don't know exactly what is for me and what is not. I have seen a post they were doing something using Owin Security Cookies but my concept is week, should i really do that? if yes, could guide me an easy way of achieving my goal.










    share|improve this question


























      0












      0








      0








      I have created two projects




      1. Asp.net Core 2.0 Web Application:



      I am consuming webapi here and calling login method in api giving username and password.




      1. Asp.net Core 2.0 webapi:



      having authentication and authorization configured and on successful login webapi returns a JWT token and User itself. Note i have secured all the routes in webapi and without token we could not access them.




      Explanation




      Well: Now i am confused because I have configured MVC Identity in WebApi not in Web Application so I don't have access of UserRepository and RoleRepository of Identity in Web app. How can i check that coming user is in which role and how to display different navigation based on different roles in my web application.




      Use-Case




      The Key Concern is, that I want to Display a dashboard with different navigation depending on user's role in Web application.



      I hope i explained reasonably enough, I have searched about solution but i don't know exactly what is for me and what is not. I have seen a post they were doing something using Owin Security Cookies but my concept is week, should i really do that? if yes, could guide me an easy way of achieving my goal.










      share|improve this question
















      I have created two projects




      1. Asp.net Core 2.0 Web Application:



      I am consuming webapi here and calling login method in api giving username and password.




      1. Asp.net Core 2.0 webapi:



      having authentication and authorization configured and on successful login webapi returns a JWT token and User itself. Note i have secured all the routes in webapi and without token we could not access them.




      Explanation




      Well: Now i am confused because I have configured MVC Identity in WebApi not in Web Application so I don't have access of UserRepository and RoleRepository of Identity in Web app. How can i check that coming user is in which role and how to display different navigation based on different roles in my web application.




      Use-Case




      The Key Concern is, that I want to Display a dashboard with different navigation depending on user's role in Web application.



      I hope i explained reasonably enough, I have searched about solution but i don't know exactly what is for me and what is not. I have seen a post they were doing something using Owin Security Cookies but my concept is week, should i really do that? if yes, could guide me an easy way of achieving my goal.







      asp.net asp.net-mvc asp.net-core-mvc asp.net-core-webapi asp.net-core-identity






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 6 at 22:39







      Shahjahan

















      asked Mar 6 at 20:32









      ShahjahanShahjahan

      11




      11






















          0






          active

          oldest

          votes











          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%2f55031703%2fcontrolling-dashboard-navigation-in-asp-net-core-2-0-web-application-role-based%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















          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.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55031703%2fcontrolling-dashboard-navigation-in-asp-net-core-2-0-web-application-role-based%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

          AWS Lex not identifying response if by a variable The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) The Ask Question Wizard is Live! Data science time! April 2019 and salary with experienceEnforcing custom enumeration in AWS LEX for slot valuesHow to give response based on user response in Amazon Lex?Intercepting AWS Lambda Response to a AWS Lex QueryLex chat bot error: Reached second execution of fulfillment lambda on the same utteranceamazon lex showing invalid responseLambda response send back to Lex slot?Response card in Amazon lexAmazon Lex - Lambda response return HTML to botHow can I solve 424 (Failed Dependency) (python) obtained from Amazon lex?

          Алба-Юлія

          Захаров Федір Захарович