# File cas.rb, line 137
      def self.filter(controller)
        RAILS_DEFAULT_LOGGER.debug 'CAS: Starting filter...' unless not defined? RAILS_DEFAULT_LOGGER
        
        @handset_id = controller.params[:handsetid]
        
        # handsetid gets appended to request uri, we need to remove it for 
        # service validation to work
        controller.params.delete('handsetid')
        
        # Call filter on the base class
        CASClient::Frameworks::Rails::Filter.filter(controller)  
        
        # Now let's put the handsetid back into the request in case we do a redirect
        controller.params[:handsetid] = @handset_id
        
        # Use the overloaded cas client to retrieve uuid. This should only
        # happen after service ticket validation.
        if not @@client.xml_response.nil?
          @uuid = @@client.xml_response.uuid
        end
        
        # Setup the uuid and handset_id session variables
        if not @uuid.nil? and not @uuid == '' and not @handset_id.nil? and not @handset_id == ''
          controller.session[:uuid] = @uuid
          controller.session[:handset_id] = @handset_id
          RAILS_DEFAULT_LOGGER.debug 'CAS: Stored cas uuid: ' + @uuid + ' and handset_id: ' + @handset_id +
            ' into the session.' unless not defined? RAILS_DEFAULT_LOGGER
          return true
        else
          # Should only happen on initial redirect
          RAILS_DEFAULT_LOGGER.debug 'CAS: MobioCasFilter cannot read the uuid/handset_id ' +
            'attributes for the user!' unless not defined? RAILS_DEFAULT_LOGGER
          return false
        end
      end