Class: Cas::Client::Server
- Inherits:
-
Object
- Object
- Cas::Client::Server
- Defined in:
- lib/cas/client/server.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Server
constructor
A new instance of Server.
- #login_url(options = {}) ⇒ Object
- #logout_url(options = {}) ⇒ Object
- #validate_service(service_url, ticket) ⇒ Object
Constructor Details
Class Method Details
.logout_url(options = {}) ⇒ Object
24 25 26 |
# File 'lib/cas/client/server.rb', line 24 def self.logout_url(={}) new.logout_url().to_s end |
Instance Method Details
#login_url(options = {}) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/cas/client/server.rb', line 8 def login_url(={}) if .key?(:service_url) @url.append_path('/login').add_query("service=#{[:service_url]}") else @url.append_path('/login') end end |
#logout_url(options = {}) ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/cas/client/server.rb', line 16 def logout_url(={}) if .key?(:service_url) @url.append_path('/logout').add_query("service=#{[:service_url]}") else @url.append_path('/logout') end end |
#validate_service(service_url, ticket) ⇒ Object
28 29 30 31 32 33 |
# File 'lib/cas/client/server.rb', line 28 def validate_service(service_url, ticket) uri = Cas::Client::URL.new(validate_service_url(service_url, ticket)).to_uri res = Cas::Client::Response.new(uri) res.validate_service_response res.all_attributes end |