def self.filter(controller)
RAILS_DEFAULT_LOGGER.debug 'CAS: Starting filter...' unless not defined? RAILS_DEFAULT_LOGGER
@handset_id = controller.params[:handsetid]
controller.params.delete('handsetid')
CASClient::Frameworks::Rails::Filter.filter(controller)
controller.params[:handsetid] = @handset_id
if not @@client.xml_response.nil?
@uuid = @@client.xml_response.uuid
end
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
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