anchor.diff:      (response "Hello Anonymous")))
   ----
   
  -.Middleware usage example
  -[source,clojure]
  -----
  -;; Import middleware function and backend constructor
  -
  +.Create an instance of authentication backend.
  +[source, clojure]
  +----
   (require '[buddy.auth.backends.httpbasic :refer [http-basic-backend]])
  -(require '[buddy.auth.middleware :refer [wrap-authentication]])
  -
  -;; This function always receives request and authdata, authdata
  -;; can vary with other backends. For http basic backend, authdata
  -;; parameter has the form {:username xxxx :password yyyy}
  +
  +;; Http Basic backend in this case requires one function with parameter
  +;; that takes a responsability to identify the incoming request.
  +
  +;; The required function is caled in authentication of parsed data
  +;; and it receives the current ring request and parsed data from parse
  +;; phase of authentication.
   ;;
   ;; This function should return a non-nil value that
   ;; is automatically stored on :identity key on request
  
positive.code:   [request, authdata]
    (let [username (:username authdata)
          password (:password authdata)]
      (search-user-on-db username password)))
  
  ;; Define the main handler with *app* name wrapping it
  ;; with authentication middleware using an instance of
  ;; just created http-basic backend.
  
  (def app
    (let [backend (http-basic-backend :realm "MyApi" :authfn my-authfn)]
      (wrap-authentication handler backend)))
  ----
  
  
  Session
  
negative.code: is ring-based) but in the future it can be extended for work with
  other libraries.
  
  
  Authentication
  ~~~~~~~~~~~~~~
  
  Buddy differs with other libraries because it takes very different approach for handling
  authentication. In first step, it clearly split authentication and authorization in two
  separated steps and in second step, implements it using "backends" and protocols for easy 
  extensibility.
  
  If you are not happy with builtin backends, you can implement your own and use it with
  buddy middlewares without any problem.
  
  Authentication in buddy, has two phases:
  
  - Parse: parsing incoming request headers, parameters etc...
  - Authenticate: having parsed data do authentication process, such as call auth function,
    unsign self contained token, etc...
  
  .Here is a list of built-in authentication backends:
  [options="header"]
  