Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Using Modules a...Using Modules a...Validating user's credentials using web apiValidating user's credentials using web api
Previous
 
Next
New Post
7/4/2014 8:36 PM
 

My project has two parts. A client application (windows form) and a Monitoring site (DNN portal).

The business requirements is that whenever a consultant is hired, he\she will need to be created in the Monitoring site with appropriate role assigned- this is done by the higher management. A default username/pw is assigned to the consultant. I believe DNN is capable of this. Basically, user management is done within the DNN portal\Monitor site.

Consultants have no knowledge of Monitor site. They should interact with the client application.

The Client application will request for the consultant's username\pw, then the client app will need a connect to some kind of webservice in the Monitor site, that will eventually validate the consultant's credentials.

What is the best approach in creating the webservice api that can interact with DNN api? If i have direct access to the database, is there a query i can use to validate username/pw?

Thank you in advanced.

 
New Post
7/6/2014 10:56 PM
 

yes, you can use the UserController.ValidateUser method -here's an example of one from the oauth code:

 var loginStatus = UserLoginStatus.LOGIN_FAILURE;

            string userName = Service + "-" + user.Id;

            var objUserInfo = UserController.ValidateUser(settings.PortalId, userName, "",

                                                                Service, "",

                                                                settings.PortalName, IPAddress,

                                                                ref loginStatus);


            //Raise UserAuthenticated Event

            var eventArgs = new UserAuthenticatedEventArgs(objUserInfo, userName, loginStatus, Service)

                                            {

                                                AutoRegister = true

                                            };

With regards to making the request, I recommend using the built in WebAPI service framework -see http://www.dnnsoftware.com/wiki/page/...

 


Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
7/7/2014 10:24 AM
 

Thank you. You were very helpful. A follow up question: when creating the webapi service using the dnn framework, is it possible to create the controllers within the same dnn portal (within the same website, hence using the same app pool) in IIS? Is this recommended, or should it reside in a website of its own?

 
New Post
7/7/2014 10:57 AM
 
you create them as a class and ensure the assembly is deployed into the bin folder, that way DNN detects it (via reflection) and can route the requests accordingly as well as verify the necessary permissions

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Using Modules a...Using Modules a...Validating user's credentials using web apiValidating user's credentials using web api


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out