Architechture of service application in WCF

前端 未结 1 343
夕颜
夕颜 2021-01-13 15:39

I need some help with the architechture of a WCF application. The will be a number of services that should be available to serve a number of different clients, e.g.

相关标签:
1条回答
  • 2021-01-13 16:35

    You can (and should) decouple Authentication from service implementation so that you can vary these independently. This is possible by implementing (or reusing) a ServiceAuthorizationManager.

    The nice thing about these is that they can be defined in .config and you can code your entire service without knowing anything about how the user authenticated.

    If you need to know more about the user, you can use Thread.CurrentPrincipal.


    To implement username/password validation, implement a UserNamePasswordValidator.

    0 讨论(0)
提交回复
热议问题