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
I have created two projects
- Asp.net Core 2.0 Web Application:
I am consuming webapi here and calling login method in api giving username and password.
- 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
add a comment |
I have created two projects
- Asp.net Core 2.0 Web Application:
I am consuming webapi here and calling login method in api giving username and password.
- 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
add a comment |
I have created two projects
- Asp.net Core 2.0 Web Application:
I am consuming webapi here and calling login method in api giving username and password.
- 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
I have created two projects
- Asp.net Core 2.0 Web Application:
I am consuming webapi here and calling login method in api giving username and password.
- 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
asp.net asp.net-mvc asp.net-core-mvc asp.net-core-webapi asp.net-core-identity
edited Mar 6 at 22:39
Shahjahan
asked Mar 6 at 20:32
ShahjahanShahjahan
11
11
add a comment |
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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