Advertisement
Shinmera

Radiance Base Implementations

Jul 2nd, 2013
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 1.49 KB | None | 0 0
  1. #|
  2.   This file is a part of TyNETv5/Radiance
  3.   (c) 2013 TymoonNET/NexT http://tymoon.eu (shinmera@tymoon.eu)
  4.   Author: Nicolas Hafner <shinmera@tymoon.eu>
  5. |#
  6.  
  7. (in-package :radiance)
  8.  
  9. (defimpl dispatcher
  10.     "Primary dispatcher module that propagates page calls to triggers."
  11.   (dispatch (request) "Dispatch a new webserver call.")
  12.   (register (trigger) "Register a trigger to dispatch to."))
  13.  
  14. (defimpl user
  15.     "Defines a very basic user class that allows tying arbitrary data to a user."
  16.   (user-get (username) "Returns the user object of an existing user or creates a new hull instance.")
  17.   (user-field (field &optional value) "Set or get a user data field.")
  18.   (user-save () "Save the user to the database.")
  19.   (user-saved-p () "Returns T if the user is not a hull instance, otherwise NIL."))
  20.  
  21. (defimpl auth
  22.     "Handles one or more methods for authentication of a user."
  23.   (authenticate ((user user)) "Authenticate the given user using whatever method applicable. Additional arguments may be necessary or read from the user object. Returns NIL on failure, user on success.")
  24.   (authenticated-p ((user user)) "Returns T if the user has been authenticated successfully, otherwise NIL."))
  25.  
  26. (defimpl session
  27.     "Session instances track whether a given user is still logged in or not."
  28.   (session-start ((user user)) "Creates a new session object for the given user or continues an existing one if applicable..")
  29.   (session-end () "Finalizes the session object and in effect logs the user out."))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement