anchor.diff:                             (st-json:getjso "publicURL" endpoints))))))))
      service-catalog-jso))
   
  -(defun get-public-url (service endpoints)
  -  "Retrieves a public URL of an OpenStack service from an alist map of
  -currently active endpoints."
  -  (alexandria:assoc-value
  -   (alexandria:assoc-value
  -    (alexandria:assoc-value endpoints service :test #'string=)
  -    "endpoints" :test #'string=)
  -   "public-url" :test #'string=))
  -
  -;;; User's OpenStack credential payload
  -
  -(defclass os-credential ()
  -  ((keystone-hostname :initarg :keystone-hostname
  -                      :reader keystone-hostname)
  -   (username :initarg :username
  -             :reader username)
  -   (password :initarg :password
  -             :reader password)
  -   (tenant-name :initarg :tenant-name
  -                :initform nil
  -                :accessor tenant-name))
  -  (:documentation "An OpenStack credential payload, with all the
  -necessary information to authenticate a user.
  -
  -Requires a hostname of the Keystone identity service, a username, and
  -a password. The tenant-name is an optional argument that will default
  -to username if not provided."))
  -
   (defmacro with-keystone-response (stream (os-c) &body body)
     "Authenticates a user by sending a credential payload to the
   Keystone identity service endpoint and binds a stream of the response
   that is returned to a specified stream symbol."
  -  `(with-os-response
  +  `(with-openstack-response
          ,stream ((format nil "http://~A:5000/v2.0/tokens" (keystone-hostname ,os-c))
                   :post
                   nil
  
positive.code: 
  ;;; Bindings for OpenStack Keystone identity API are defined here
  
  ;;; Helper functions
  
  (defun parse-endpoints (service-catalog-jso)
    "Parses a JSON containing currently active service endpoints."
    (mapcar
     #'(lambda (jso)
         (cons (st-json:getjso "name" jso)
  
negative.code:           (setf token-expiration-time
                  (local-time:parse-timestring (st-json:getjso "expires" token-jso))))))))
  
  (defun make-openstack-token (keystone-hostname username password &optional tenant-name)
    "Creates and returns a new instant of the OpenStack token object."
    (let ((os-c (make-openstack-credential keystone-hostname
                                           username
                                           password
                                           tenant-name)))
      (make-instance 'openstack-token :credential os-c)))
  
  (defun authenticate (keystone-hostname username password &optional tenant-name)
    "Authenticates a user, and initializes the default global special
  variables."
    (setf *openstack-token*
          (make-openstack-token keystone-hostname username password tenant-name)))
  