Squeak Class Documentation category index | class index  
 
AuthorizedSwikiAction
  category: Network-Pluggable Web Server
  superclass: SwikiAction
  subclasses: AuthorizedWriteSwiki RenderingSwikiAction

A Server with a login name and password for the entire Swiki area. Can be multiple users each with a different password. Each sees and can modify the whole Swiki area.

To restart an existing Authorized Swiki:

AuthorizedSwikiAction new restore: 'SWSecure'.

The front page URL is: http://serverMachine:80/SWSecure.1

To make a completely new one:
| a s |
a := Authorizer new.
a realm: 'SwikiArea'.
a mapName: 'viki' password: 'hard2guess' to: 'viki'.
AuthorizedSwikiAction setUp: 'SWSecure'.
s := AuthorizedSwikiAction new restore: 'SWSecure'.
s authorizer: a.

instance methods
  URL processing
  authorizer
authorizer:
checkAuthorization:
mapName:password:to:
process:
processSpecial:
restore:

class methods
  no messages
 

instance methods
  URL processing top  
 

authorizer

*** Do not use this method to add or delete users! The change will not be recorded on the disk! Instead call mapName:password:to: in this class.***


 

authorizer:

Smash all old name/password pairs with this new set. Overwrites the file on the disk


 

checkAuthorization:


 

mapName:password:to:

Insert/remove the username:password combination into/from the users Dictionary. *** Use this method to add or delete users! If you ask for the authorizer and talk to it, the change will not be recorded on the disk! *** We use encoding per RFC1421.


 

process:

URLs are of the form:
{swikiname} browse Front Page
{swikiname}.{coreID} browse the page number coreID
{swikiname}.{coreID}.edit request to edit the page
{swikiname}.{coreID}.versions show the last three versions of the page
{swikiname}.{coreID} {with a field named 'text'} store an edited page
{swikiname}.{coreID}.insert.{placeID} request to insert text in a
specific place in a page
{swikiname}.{coreID} {with a field named 'text-placeID'} store
text in a specific place
-------
{swikiname}.{coreID}.all displays the page and all its references
{swikiname}.searchresult conducts the search and displays the result
{swikiname}.recent to bring up the recent changes list
{swikiname}.{coreID}.searchresult returns a search for references
to coreID's key
{swikiname}.{picName}.gif or .jpeg, .jpg, .jpe, .html (upper or
lower case) return
the picture or static page stored in the {swikiname} folder.


 

processSpecial:

Let SwikiAction process this with no authorization check.


 

restore:

Read all files in the directory 'nameOfSwiki'. Reconstruct the url map.


class methods
  no messages top