DrupalPlugins

Not logged in - Log In / Register

Integrating your Drupal site with Launchpad

You can now integrate your Drupal 5.x site with Launchpad using our two new Drupal modules:

This means you can build a community site outside of Launchpad that can take full advantage of the power and flexibility of Drupal, and its extensive list of third party modules, while maintaining strong links with your development activity and community in Launchpad.

Pre-requisites

To use the Launchpad modules, you must be running Drupal 5.x and use Launchpad's modified version of the Drupal OpenID plugin, which you can download from its Launchpad page.

Downloading and installing

You can find the Launchpad Drupal modules on the main Drupal site:

Alternatively, you can get hold of the very latest bleeding-edge code direct from Launchpad. First, cd to your Drupal modules directory, then:

 $ bzr branch lp:drupal-openid openid
 $ bzr branch lp:drupal-launchpad launchpad
 $ bzr branch lp:drupal-teams teams

Installation is straightforward: follow the standard module installation instructions in the Drupal documentation.

Configuring the Launchpad module

The Launchpad module sets some sensible defaults for the most likely usage of Launchpad as a single sign-on provider. There are, however, some additional steps you may have to take to ensure your existing Drupal configuration is suitable:

  1. To ensure your users can log in with the minimum of interruption, go to "Administer > User Management > User Settings" and make the following changes:

    • In the section labelled "Public registrations", select the most appropriate option. If you want any authenticated Launchpad user to be able to log in to your site, or if you want to use the teams module to restrict logins to members of certain teams, you should select "Visitors can create accounts and no administrator approval is required".
    • If Launchpad is configured to return email addresses as part of the log in process (see 'Registering your Site with Launchpad' below), uncheck "Require e-mail verification when a visitor creates an account" unless you want your users to verify their email address when they sign in to your site for the first time.
  2. Add the login block to your site by going to "Administer > Site Building > Blocks" and making the following changes:

    • Set the "User login" block region to "None"
    • Set the "Launchpad Login Button" block region appropriately for your site.
    • Click "Save blocks"
    • Click "configure" for the "Launchpad Login Button" block and:
      • Select the appropriate server from "Select server:". In most cases this would be "Production".
      • In the section labelled "Page specific visibility settings", select "Show block on specific pages:"
      • In the text box labelled "Show on every page except the listed pages.", add the follow entries (1 per line): 'user', 'user/*'
    • Click "Save block"

These are the Launchpad-specific settings which are available:

Registering your site with Launchpad

Launchpad uses OpenID to provide its single sign-on facility to external sites. Using the Simple Registration Extension (SREG) you can request additional data about the user during the login process. In order to protect the privacy of Launchpad user, Launchpad limits the data that it returns to untrusted sites. By default, Launchpad will only return a user's username if it is requested and will ignore any other requests. The Launchpad module for Drupal takes account of this limitation and allows your users to enter their email address manually when they log in to your site for the first time.

If you would like to avoid this step and also allow your site to keep users' email addresses in sync with Launchpad, you will need to add your site to Launchpad's list of trusted sites.

To do that, please file a question on the Launchpad project telling us your site's trust root or realm. A trust root is what Launchpad (and other OpenID providers) use to identify your site and check its entitlement to user data. You can find your site's trust root in Drupal's "Administration Site configuration OpenID Settings".

Changing the Launchpad environment

Launchpad has three main environments:

By default, the module uses the Launchpad's production server. You can change to edge or staging in Drupal's Administer > Site Building > Blocks > Launchpad Login Button section.

Configuring the teams module

The teams module allows you to assign Drupal roles to users each time they log in, based on their membership of Launchpad teams you specify.

  1. In Drupal, go to Administration Site configuration OpenID Teams/

  2. Enter a Launchpad team id in the empty Team text-box at the bottom of the list of team to role settings. Note: the team id is the unique section of the team's Launchpad URL, such as launchpad-beta-testers.

  3. Select a Drupal role from the drop-down list (see below).

  4. Leave the "Trust" pull-down list set as "Any Server" (see 'Trusted servers' below).
  5. Click "Save changes"

Assigning Drupal roles

When you select which roles to assign to people with certain team memberships, you should create Drupal specifically for that purpose. This is because the Teams module assigns these roles automatically on login and then unassigns them on logout, regardless of how they were originally assigned to the user.

Trusted servers

The openid-teams module implements an extension to the OpenID standard. As the proposer of the standard, Launchpad is currently the only OpenID provider that implements it. However, it's open for anyone to implement.

Our Drupal module is ready to assign roles based on team information coming from several different OpenID providers. However, before you can use the teams module with a provider other than Launchpad, you need to set the new provider in the Trusted Providers list. If you're only using Launchpad as a provider, you can ignore it.

Feedback, questions and bug reports

Please submit your feedback, questions and bug reports for any of these modules at the drupal-openid project on Launchpad.

DrupalPlugins (last edited 2010-04-24 01:34:31 by sinzui)