# File lib/casclient/frameworks/rails/cas_proxy_callback_controller.rb, line 40
  def retrieve_pgt
    #render_error "You can only retrieve PGTs via HTTPS or local connections." and return unless
    #  request.ssl? or request.env['REMOTE_HOST'] == ""
    pgtIou = params['pgtIou']
    render_error "No pgtIou specified. Cannot retreive the pgtId." and return unless pgtIou
    pstore = open_pstore
    pgt = nil
    pstore.transaction do
      pgt = pstore[pgtIou]
    if not pgt
      render_error "Invalid pgtIou specified. Perhaps this pgt has already been retrieved?" and return
    render :text => pgt
    # TODO: need to periodically clean the storage, otherwise it will just keep growing
    pstore.transaction do
      pstore.delete pgtIou