From 54cf5a62cab254e923c8d73ae8bd043a1f33c3b1 Mon Sep 17 00:00:00 2001 From: joey Date: Mon, 20 Nov 2006 01:52:18 +0000 Subject: * Make auth methods pluggable. * Move httpauth support to a plugin. * Add an openid plugin to support logging in using OpenID. --- doc/plugins/httpauth.mdwn | 9 +++++++++ doc/plugins/map.mdwn | 1 - doc/plugins/openid.mdwn | 12 ++++++++++++ doc/plugins/type/auth.mdwn | 2 ++ doc/plugins/write.mdwn | 13 +++++++++++++ 5 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 doc/plugins/httpauth.mdwn create mode 100644 doc/plugins/openid.mdwn create mode 100644 doc/plugins/type/auth.mdwn (limited to 'doc/plugins') diff --git a/doc/plugins/httpauth.mdwn b/doc/plugins/httpauth.mdwn new file mode 100644 index 000000000..98233570c --- /dev/null +++ b/doc/plugins/httpauth.mdwn @@ -0,0 +1,9 @@ +[[template id=plugin name=httpauth included=1 author="Alec Berryman"]] +[[tag type/auth]] + +This plugin allows HTTP basic authentication to be used to log into the +wiki. To use the plugin, your web server should be set up to perform HTTP +basic authentiation. The authenticated user will be automatically signed +into the wiki. + +This plugin is included in ikiwiki, but is not enabled by default. diff --git a/doc/plugins/map.mdwn b/doc/plugins/map.mdwn index 01f61e5b3..592a20706 100644 --- a/doc/plugins/map.mdwn +++ b/doc/plugins/map.mdwn @@ -12,7 +12,6 @@ Hint: To limit the map to displaying pages less than a certian level deep, use a [[PageSpec]] like this: `pages="* and !*/*/*"` This plugin is included in ikiwiki, but is not enabled by default. -It was contributed by Alessandro Dotti Contra. If this plugin is enabled, here is a page map for the plugins section of this wiki: diff --git a/doc/plugins/openid.mdwn b/doc/plugins/openid.mdwn new file mode 100644 index 000000000..344be7de3 --- /dev/null +++ b/doc/plugins/openid.mdwn @@ -0,0 +1,12 @@ +[[template id=plugin name=openid included=1 author="[[Joey]]"]] +[[tag type/auth]] + +This plugin allows users to use their [OpenID](http://openid.net/) to log +into the wiki. + +The plugin needs the `Net::OpenID::Consumer` perl module. The +`LWPx::ParanoidAgent` perl module is used if available, for added +security. Finally, the `Crypt::SSLeay` perl module is needed to support +users entering "https" OpenID urls. + +This plugin is included in ikiwiki, but is not enabled by default. diff --git a/doc/plugins/type/auth.mdwn b/doc/plugins/type/auth.mdwn new file mode 100644 index 000000000..a6ae5e4ea --- /dev/null +++ b/doc/plugins/type/auth.mdwn @@ -0,0 +1,2 @@ +These plugins add different authentication methods for logging in to the +wiki. diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 5cace0911..7c4da8d5f 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -175,6 +175,19 @@ called in turn, and passed a CGI object. The hook should examine the parameters, and if it will handle this CGI request, output a page and terminate the program. +### cgi + + hook(type => "cgi", id => "foo", call => \&auth); + +This hook can be used to implement a different authentication method than +the standard web form. When a user needs to be authenticated, each registered +auth hook is called in turn, and passed a CGI object and a session object. + +If the hook is able to authenticate the user, it should set the session +object's "name" parameter to the authenticated user's name. Note that +if the name is set to the name of a user who is not registered, +a basic registration of the user will be automatically performed. + ### savestate hook(type => "savestate", id => "foo", call => \&savestate); -- cgit v1.2.3