The core logic for handling CAS requests independent of any particular storage or web presentation technology.
- ruby 1.9.x
Currently available adapters are:
If you want to create a new adapter check these 2 adapters how they are implemented. Essentially you need to implement the following methods for each ticket:
class XXXTicket
def initialize(options = {})
end
#deprecated
def self.find_by_ticket(ticket)
#returns the ticket based on the ticket id
#it will be removed soon
end
def self.find_by(opts = {})
#returns the ticket based on the constraints in the hash (activerecord-style)
end
def save!
#saves the ticket in the storage
#throws an exception in case of an error
end
def save
#saves the ticket in the storage
end
def consumed?
#returns true if ticket is already consumed
end
def consume!
#consumes the ticket
end
def expired?(max_lifetime = 100)
#checks if the ticket is already expired
end
end
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
- String object as a hash key for all settings from Setting class.