Return-Path: Delivered-To: apmail-incubator-jspwiki-user-archive@minotaur.apache.org Received: (qmail 10932 invoked from network); 13 Jan 2010 22:43:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 13 Jan 2010 22:43:06 -0000 Received: (qmail 97209 invoked by uid 500); 13 Jan 2010 22:43:06 -0000 Delivered-To: apmail-incubator-jspwiki-user-archive@incubator.apache.org Received: (qmail 97203 invoked by uid 500); 13 Jan 2010 22:43:06 -0000 Mailing-List: contact jspwiki-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jspwiki-user@incubator.apache.org Delivered-To: mailing list jspwiki-user@incubator.apache.org Received: (qmail 97193 invoked by uid 99); 13 Jan 2010 22:43:06 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Jan 2010 22:43:06 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of tomwheel@gmail.com designates 209.85.221.182 as permitted sender) Received: from [209.85.221.182] (HELO mail-qy0-f182.google.com) (209.85.221.182) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Jan 2010 22:42:58 +0000 Received: by qyk12 with SMTP id 12so5430397qyk.21 for ; Wed, 13 Jan 2010 14:42:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=q1gInvzcUu3/bGP/0US9Gq1lzrhaWlOH1TsslGV0ZyU=; b=QwOY/iz3twhnE+JEI1PDqDLSEidGeeaG4IPjM4QDvsHriTUmj0vK6Ootq0nz/09beJ u0IrxTBJy7OWBKm4MD3yRJ7hoXv991ir3LasO72YVQNBvsuFHpRCi4LiahtcwqN/9uML pHprgZJ1QdmmPUi/MdOOepjED+Qi6Y6d8BIfg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=m4TNUi9xmkgCTLeNZpgphym+iwObSGjMNimvYud5SUFUrNH1ygK2gRAbqOwj9BVcKR maGF/7m7wLn8rYKAfod2viTskO+kNun+HLSpYAN3XfMIhTkss1Gzzzl9GQ+Bgx6ksUCL I7suKfvHNpdONeWC4cAL38aJGUi1UhgGgj/BU= MIME-Version: 1.0 Received: by 10.229.116.140 with SMTP id m12mr5616148qcq.54.1263422557258; Wed, 13 Jan 2010 14:42:37 -0800 (PST) In-Reply-To: <4a6f63fa1001111239g2315d4a0m71a0067aec7aaa64@mail.gmail.com> References: <4a6f63fa1001081503o4c89f9aajcde094b944fe1310@mail.gmail.com> <4a6f63fa1001111239g2315d4a0m71a0067aec7aaa64@mail.gmail.com> Date: Wed, 13 Jan 2010 16:42:37 -0600 Message-ID: <4a6f63fa1001131442h4439a91fvfc2014290a98bea2@mail.gmail.com> Subject: Re: Hints for Integrating Custom Authentication? From: Tom Wheeler To: jspwiki-user@incubator.apache.org Content-Type: text/plain; charset=ISO-8859-1 I may have spoken too soon in my previous message. I think I'm probably close, but it's definitely not working. Most of my confusion comes from outdated documentation related to authentication in the Wiki. Several times I've followed something that seems to address my problem, only to find out that it's for some earlier version and does not apply to 2.8.3. In the end, I am not really sure what's correct for my version. My first step was based on Jack Hericus' example. I subclassed the AbstractLoginModule to check the session for authentication credentials and then added the principals upon login. I put the JAR file containing this class in the WEB-INF/lib directory and then set the jspwiki.loginModule.class property in the jspwiki.properties file to its fully-qualified name. I had several log statements in the login() method, but none of the messages ever showed up in the log. It was at least trying to create the class, though, because I intentionally changed the class name to something invalid as a test and JSPWiki failed to start because of it. My next step was based on Andrew's advice to register a servlet filter before JSPWiki's filter and then wrap the request to set the user Principal. This *almost* worked -- after my filter is invoked, JSPWiki shows that I am authenticated and logged in using the expected name. But a lot of other things don't work, such as saving the user preferences (no error, but they immediately revert to their defaults). Viewing the profile or group tabs on the preferences pages doesn't work either; clicking the tabs does not change what's shown. This is also true of the Attach tab on any page, though the Info tab does show the history of my edits. The userdatabase.xml and groupdatabase.xml files are present but empty (except for their root elements). I'd like to use JSPWiki to manage the groups, if that's possible. Any ideas as to what I should check? Is there a simple example which uses 2.8.3 for custom login anywhere? Thanks for any help- Tom On Mon, Jan 11, 2010 at 2:39 PM, Tom Wheeler wrote: > Yes, I have JSPWiki 2.8.3 installed. > > ... I am still working through the finer points, but I understand the > code and think I'm on the right track now. -- Tom Wheeler http://www.tomwheeler.com/