Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/oddcamp/rubycas-server-core
The core logic for handling CAS requests independent of any particular storage or web presentation technology.
https://github.com/oddcamp/rubycas-server-core
Last synced: about 2 months ago
JSON representation
The core logic for handling CAS requests independent of any particular storage or web presentation technology.
- Host: GitHub
- URL: https://github.com/oddcamp/rubycas-server-core
- Owner: oddcamp
- License: mit
- Created: 2015-03-24T06:40:25.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2017-06-01T10:54:56.000Z (over 7 years ago)
- Last Synced: 2023-03-12T07:42:12.618Z (almost 2 years ago)
- Language: Ruby
- Size: 74.2 KB
- Stars: 0
- Watchers: 12
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
rubycas-server-core
===================
[![Circle CI](https://circleci.com/gh/kollegorna/rubycas-server-core.svg?style=svg)](https://circleci.com/gh/kollegorna/rubycas-server-core)The core logic for handling CAS requests independent of any particular storage or web presentation technology.
## Requirements
* ruby 1.9.x
## Adapters
Currently available adapters are:
* [rubycas-server-activerecord](https://github.com/kollegorna/rubycas-server-activerecord)
* [rubycas-server-memory](https://github.com/vasilakisfil/rubycas-server-memory)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:
```ruby
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
enddef self.find_by(opts = {})
#returns the ticket based on the constraints in the hash (activerecord-style)
enddef save!
#saves the ticket in the storage
#throws an exception in case of an error
enddef save
#saves the ticket in the storage
enddef consumed?
#returns true if ticket is already consumed
enddef consume!
#consumes the ticket
enddef expired?(max_lifetime = 100)
#checks if the ticket is already expired
endend
```## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request### Coding conventions
1. String object as a hash key for all settings from Setting class.