Class: Casablanca::CasResponseParser
- Inherits:
-
Object
- Object
- Casablanca::CasResponseParser
- Defined in:
- lib/casablanca/response_parsers.rb
Direct Known Subclasses
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.parse(ticket, body) ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/casablanca/response_parsers.rb', line 8 def self.parse(ticket, body) raise ResponseError, "Response body is empty" if body.nil? || body.strip == "" #return Cas_1_0_Parser.new(body) if ? response = Cas_2_0_ResponseParser.new(body) ticket.user = response.user unless response.authenticated? ticket.failure_code = response.failure_code ticket. = response. end end |
Instance Method Details
#protocol ⇒ Object
4 5 6 |
# File 'lib/casablanca/response_parsers.rb', line 4 def protocol self.class.to_s.gsub(/(Casablanca::Cas_|_ResponseParser)/, '').gsub('_', '.').to_f end |