public
Fork of gitmirror/webistrano
Description: My fork of the Webistrano SVN source mirror.
Homepage: http://labs.peritor.com/webistrano
Clone URL: git://github.com/timshadel/webistrano.git
timshadel (author)
Tue Sep 23 13:25:03 -0700 2008
commit  24a304afeabf5dcc9139e5bbb7396bdbf56b711c
tree    9284ddf2d4f083f2128d89543e050e7d2da5b0c9
parent  76b00ded89f7c92eed1883b412fa4c801a3b9df4
100644 38 lines (31 sloc) 0.682 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
module CASClient
  # Represents a CAS service ticket.
  class ServiceTicket
    attr_reader :ticket, :service, :renew
    attr_accessor :response
    
    def initialize(ticket, service, renew = false)
      @ticket = ticket
      @service = service
      @renew = renew
    end
    
    def is_valid?
      response.is_success?
    end
    
    def has_been_validated?
      not response.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