The Key Redirect module is a plugin for the Services module, which provides a method for external applications to automatically redirect users to a URL on your Drupal site, and log them in at the same time.

The use case for which this module was written was a Java application which shares authentication sources with a Drupal site (and therefore knows the user's username and plaintext password), which needed a method of sending users to a private web page without requiring the user to re-authenticate to the site. Think of it as a poor-man's single-sign-on solution.

Key Redirect requires the Services module to be enabled, and supports whatever Services authentication types and server types you wish to enable. See the Services Handbook for information on accessing Services with your external application.

The Key Redirect only provides a single method, keyredirect.getKey, which takes three required parameters:

If the user authenticates successfully keyredirect.getKey returns a string with a URL:
http://yoursite.com/krd/Kf7BkdEGUckueiHwQzDHm95YDv9swU
When the user visits that string, they will be logged in to Drupal (if they are not already), and redirected to the path you passed to the method.

If the user fails to authenticate, an appropriate RPC error is returned, along with a HTTP 401 response. Note that we're also supporting the LDAP Integration module's er ... funky ... approach to authentication, and it's auth hooks will be tried first.