Substitute IdentityServer3 login system

后端 未结 1 770
梦毁少年i
梦毁少年i 2021-01-24 05:26

Following @leastprivilege answer in my previous question, I concluded that neither are possible solutions:

  • The login service doesn\'t support REST authentication
相关标签:
1条回答
  • 2021-01-24 06:16

    Solved it after some research. You'll need this three steps:

    • A Owin Authentication middleware that redirects to the page you want, providing the protected state (this will let you finish the authentication process later). You can follow [Anders Abel tutorial]
    • Custom user service that overrides the PreAuthentication method and sets the SignInMessage message.Idp with your middleware id. Code sample: check it here
    • After the successful authentication, your page should redirect to the middleware callback with the state parameter. With the mentioned dummy middleware, it's set as /signing-dummy
    0 讨论(0)
提交回复
热议问题