I am creating a simple web service, for DotNetNuke 7, that will allow an iOS or Android app to authenticate a user with our website to make sure they are a member and so allowed to view restricted content on the app.
I have a test webservice running that responds to annonymous connections. How do I actually get it to login into the website and retrieve data back (like roles and contact information)?
public class SiteLoginController : DnnApiController
{
[DnnAuthorize]
[HttpGet]
public HttpResponseMessage LoginToSite(string username, string password)
{
// go log into website
// if they have an account
// retrieve role and contact info
// else
// return invalid credentials message
}
}
I have looked online for a while now and most answers seem to relate to allowing annonymous access and not actually authenticating the user.