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

HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsAuthenticationAuthenticationGlobal Login helpGlobal Login help
Previous
 
Next
New Post
3/20/2008 4:30 PM
 

I'm trying to create a simple hack on the DNN authentication service to provide a single point of login for multiple portals - that is, you login from one page, and it redirects you to your portal.  I've got code that I believe will do this, however I can't figure out how to set up an installable package.  The errors on Authentication Module installation are less than helpful ("Installation failed, see below" "Installation failed").

The process I used was to simply clone the AuthenticationServices/DNN directory, and add my hacks in.  I suspect that there's something somewhere else that I need to touch, but I'm not sure what - the OpenID and LiveID have a .dll as well, which there's no indication from where they come.  There also seem to be .resource files, too, that I have the same situation with: I don't know what they are, where they come from, or what they do.

Any help would be appreciated.

Thanks,

Mike

 
New Post
3/21/2008 6:53 PM
 

Hi Mike

The authentication providers all use the new package installer (under Host->Host Settings->Authentication Settings) that was developed for DNN 4.6.0 and will be used for all modules when DNN 5.0 is released. I suspect that there's a problem somewhere in the .dnn file that you've created. I'm not sure where you've attempted to install your authentication provider but if it's not there then it'll cause an error for sure. A non-clean way of installing your provider in your dev portal is just to add a line for it in the AuthenticationTypes table in your database. I say non-clean because there's a couple of other tables that have records written on installation and removal but this should at least get it showing up for you under the Admin->Authentication page.

Each provider uses it's own .dll though I believe the DNN standard provider is wrapped up into the core .dll (I could be wrong but I don't have the code in front of me at the moment). The .resources files are just extensioned renamed .zip files that contain the actual source code. If you were to install the source version of the provider into your DNN dev install the files in the .resources file are extracted. You can do this manually just by renaming the extension to .zip.

I hope this helps a little bit. Feel free to post back if it doesn't or if you've got more questions.

 
New Post
3/24/2008 9:10 AM
 

Ok, let's see if I understand the architecture and all that, now:

  • The user sees an Authentication Service module, which deals with the login UI behaviour.  As I want to put in a URL redirect after login, this is where that should go, yes?
  • The Authentication Services use an underlying Authentication Provider which deals with actually validating whether users are allowed in.  The AS should not, itself, do any validating.
  • DNN is expecting that any Authentication Service module comes with its own Authentication Provider?  Thus, if I'm only using the DNN default stuff, I run into issues as I've only got the frontend changed.
  • The .dnn file uses a different syntax for Auth_Service packages than for basic DNN modules - this further reinforces that they're considered separate things (I managed to get my DNN_Global working as a module, for a definition of "working" that involves showing up, but doing nothing :p)

So, further questions: if DNN is expecting an Auth Provider with the frontend, where can I turn that off in the code?  Second, what should a valid .dnn file look like?  Here's what I've got:

<dotnetnuke type="Package" version="4.0">
  <packages>
    <package name="DNN_Global" type="Auth_System" version="01.00.00">
      <friendlyname>Global Authentication Project</friendlyname>
      <description/>
      <vendor>
        <companyName>X</companyName>
      </vendor>
      <dependencies />
      <components>
        <component type="AuthenticationSystem">
          <authenticationService>
            <type>DNN_Global</type>
            <settingsControlSrc>DesktopModules/AuthenticationServices/DNN_Global/Settings.ascx</settingsControlSrc>
            <loginControlSrc>DesktopModules/AuthenticationServices/DNN_Global/Login.ascx</loginControlSrc>
            <logoffControlSrc/>
          </authenticationService>
        </component>
        <component type="File">
          <files>
            <basePath>DesktopModules/AuthenticationServices/DNN_Global</basePath>
            <file>
              <path>App_LocalResources</path>
              <name>Login.ascx.resx</name>
            </file>
            <file>
              <path>App_LocalResources</path>
              <name>Settings.ascx.resx</name>
            </file>
            <file>
              <name>Login.ascx</name>
            </file>
            <file>
              <name>Login.ascx.vb</name>
            </file>
            <file>
              <name>Settings.ascx</name>
            </file>
            <file>
              <name>Settings.ascx.vb</name>
            </file>
          </files>
        </component>
      </components>
    </package>
  </packages>
</dotnetnuke>

And my final question is: what should be contained within the installation zip file?

 

Thanks again,

Mike

 
New Post
3/24/2008 11:26 AM
 

Mike MacMartin wrote

Ok, let's see if I understand the architecture and all that, now:

  • The user sees an Authentication Service module, which deals with the login UI behaviour.  As I want to put in a URL redirect after login, this is where that should go, yes?

Yes
  • The Authentication Services use an underlying Authentication Provider which deals with actually validating whether users are allowed in.  The AS should not, itself, do any validating.

  • The words service and provider are interchangeable in this process. You could look at it as one Authentication Service that can contain multiple providers or services (DNN Standard, ActiveDirectory, LiveID, OpenID, Cardspace, yours, etc.). So you can do some validation in the login.ascx.vb where you will be checking that, yes, the user has/has not logged in.
    • DNN is expecting that any Authentication Service module comes with its own Authentication Provider?  Thus, if I'm only using the DNN default stuff, I run into issues as I've only got the frontend changed.

    See above. Have you changed the namespace etc. for your project or are you trying to use the original namespace? I think your best bet would be to create your own project/namespace, then copy/paste the DNN Standard code, make your modifications, and then build your own .dll
  • The .dnn file uses a different syntax for Auth_Service packages than for basic DNN modules - this further reinforces that they're considered separate things (I managed to get my DNN_Global working as a module, for a definition of "working" that involves showing up, but doing nothing :p)
  • So, further questions: if DNN is expecting an Auth Provider with the frontend, where can I turn that off in the code?  Second, what should a valid .dnn file look like?  Here's what I've got:


     
       
          Global Authentication Project
         
         
            X
         
         
         
           
             
                DNN_Global
                DesktopModules/AuthenticationServices/DNN_Global/Settings.ascx
                DesktopModules/AuthenticationServices/DNN_Global/Login.ascx
               
             
           

           
             
                DesktopModules/AuthenticationServices/DNN_Global
               
                  App_LocalResources
                  Login.ascx.resx
               
               
                  App_LocalResources
                  Settings.ascx.resx
               
               
                  Login.ascx
               
               
                  Login.ascx.vb
               
               
                  Settings.ascx
               
               
                  Settings.ascx.vb
               
             
           

         
       
     

    And my final question is: what should be contained within the installation zip file?

     

    Thanks again,

    Mike

    Your .dnn file looks okay. As far as what needs to be included in it; basically whatever you think you need. Have you installed the DNN Starter Kit templates? In my opinion, the best way to go is to start with the DotNetNuke Compiled Module and then create your provider/service. I'm tempted to say we should take this to email but I think in the end it'll be better if we keep it in the forum for others that are interested in creating their own provider. That's not to say that we won't have to email each other on some details.

     
    New Post
    3/26/2008 10:05 AM
     

    Found at least one critical error, and I'm going to fix it now: the license column of the Packages table is declared NOT NULL.  I can understand that being the case - no license normally doesn't make sense.  I don't know if there's any more errors with my package yet.

    I would suggest when the package is validated before showing the "accept license" screen, if there isn't a license then there should be an error message shown.  The other option is to remove the "NOT NULL" or just insert '' when there's no license file.

    Thanks again,

    Mike

     
    Previous
     
    Next
    HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsAuthenticationAuthenticationGlobal Login helpGlobal Login help


    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