none
WCF Security implementation using UserNamePasswordValidator - how to pass user name and password from query string RRS feed

  • Question

  • Hi,

    We are planning to implement WCF Security implementation using UserNamePasswordValidator. Our client will consume service thorugh URL and user name, password will be passed thorugh query string.

    How to retrive user name from query string and pass it to UserNamePasswordValidator. Or Please suggest security implementation mechanism for this king of development.

    -Sugumar Pannerselvam

    Thursday, May 14, 2015 7:45 AM

Answers

  • Hi Sugumar Pannerselvam,

    >>Our client will consume service thorugh URL and user name, password will be passed thorugh query string.

    I will recommand you create a WCF Rest method with a UriTemplate, then you can use the Username and Password as parameter, after that client will consume service through URL and Username/Password will be passed thorugh query string.
    For example you can created a GET method as following:

    [OperationContract]
    [WebGet(UriTemplate = "UserNameAuthentication/{username}/{password}”)]
    string AuthenticationUser(string username,string password)

    For more information, please try to check the following article about how to do the custom Username and Password authentication in WCF Service:
    http://www.codeproject.com/Articles/96028/WCF-Service-with-custom-username-password-authenti .


    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.




    Friday, May 15, 2015 5:43 AM
    Moderator