Using DNN authentication and authorization info from another ASP.NET app

后端 未结 2 1567
孤城傲影
孤城傲影 2021-01-28 08:37

I have an ASP.NET web application \"K\" that has its own authentication and authorization built on SimpleMembershipProvider.

Now I want to set up a web site that has ap

2条回答
  •  执念已碎
    2021-01-28 09:14

    It sounds like you need to modify the authentication method of your "K" application. Then, you could build a module that takes care of the behaviors based on whether the user is logged in and is in a certain role.

    Once you log into DNN and check the roles, your user needs to be authenticated to the "K" website.

    We do something similar, but it required that our "internal" site would accept a token as proof of who the user was and they were authenticated.

    Here is an example of what we do:

    • Both sites must check for cookie/Token
      • If token exists, refresh it. If not, create cookie/token
    • "Internal" site checks for cookie and uses value to authenticate to Token database
    • Subsequent requests read the token from the cookie and validate against Token database
    • When user logs out, cookie and database entry are deleted
    • If user does not log out properly, you must clean up tokens on a set interval

提交回复
热议问题