Sha256: 77b33340cdba22f0b746acb5a5a7e31f40b0d6124fa9157f7f91912b1ab4690a

Contents?: true

Size: 733 Bytes

Versions: 13

Compression:

Stored size: 733 Bytes

Contents

module CASClient
  # Represents a CAS service ticket.
  class ServiceTicket
    attr_reader :ticket, :service, :renew
    attr_accessor :user, :extra_attributes, :pgt_iou, :success, :failure_code, :failure_message
    
    def initialize(ticket, service, renew = false)
      @ticket = ticket
      @service = service
      @renew = renew
    end
    
    def is_valid?
      success
    end
    
    def has_been_validated?
      not user.nil?
    end
  end
  
  # Represents a CAS proxy ticket.
  class ProxyTicket < ServiceTicket
  end
  
  class ProxyGrantingTicket
    attr_reader :ticket, :iou
    
    def initialize(ticket, iou)
      @ticket = ticket
      @iou = iou
    end
    
    def to_s
      ticket
    end
  end
end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
rubycas-client-2.3.10.rc1 lib/casclient/tickets.rb
rubycas-client-2.3.9 lib/casclient/tickets.rb
rubycas-client-2.3.9.rc1 lib/casclient/tickets.rb
rubycas-client-2.3.8 lib/casclient/tickets.rb
rubycas-client-2.3.7 lib/casclient/tickets.rb
rubycas-client-2.3.6 lib/casclient/tickets.rb
rubycas-client-2.3.5 lib/casclient/tickets.rb
rubycas-client-2.3.3 lib/casclient/tickets.rb
rubycas-client-2.3.2 lib/casclient/tickets.rb
rubycas-client-2.3.1 lib/casclient/tickets.rb
rubycas-client-2.3.0.rc1 lib/casclient/tickets.rb
vibes-rubycas-client-2.3.0.alpha8 lib/casclient/tickets.rb
vibes-rubycas-client-2.3.0.alpha7 lib/casclient/tickets.rb