[Seaside] Re: Can't seem to get HTTP Auth working

Stephen Pair stephen at pairhome.net
Thu Jul 3 13:11:51 CEST 2003


Ken Causey wrote:

>Avi,
>
>Woohoo!  You hit the nail on the head.  That seems to fix it.  Now to
>add support for multiple usernames and passwords.  Thank you very much
>for the fast response.
>
>Ken
>  
>

Comanche 6.1 has some stuff you might find useful (like KomAuthDb) for 
this...the following (taken from the ModAuth documentation) is an 
example of a Comanche configuration that authenticates users:

    | ma authdb |
    authdb := KomAuthDb new.
    authdb addUser: 'admin' withPassword: 'password'.
    ma := ModuleAssembly core.
    ma authenticate: authdb realm: 'Demo'.
    ma addPlug:
        [ :request |
        HttpResponse fromString: 'Hello world!'].
    (HttpService startOn: 8080 named: 'Example') plug: ma rootModule.

In this example, all requests will be authenticated...you could move the 
authentication modules within alias or virtual host modules to only 
authentication subsets of Http requests.  See the documentation (class 
comments) of ModAuth for more details.  If you do make your own 
authentication database, you might consider making using a similar 
protocol to KomAuthDb (or subclass it)...that will allow your 
authentication database to be used with Comanche's HTTP Auth support.

- Stephen




More information about the Seaside mailing list