PageRenderTime 43ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/examples/service-provider/server.lisp

http://github.com/skypher/cl-oauth
Lisp | 17 lines | 11 code | 6 blank | 0 comment | 0 complexity | 6a26c493977c12f1c9c6db386ddb1f8e MD5 | raw file
Possible License(s): LGPL-3.0
  1. (in-package :oauth)
  2. (export '(start-server stop-server))
  3. (defvar *server* nil)
  4. (defun start-server (&rest acceptor-args)
  5. (setf oauth:*request-adapter* (oauth:make-hunchentoot-request-adapter))
  6. (if *server*
  7. (warn "Server already started, doing nothing.")
  8. (hunchentoot:start (apply #'make-instance 'hunchentoot:acceptor acceptor-args))))
  9. (defun stop-server ()
  10. (when *server*
  11. (hunchentoot:stop *server*)))