rubycas-client 0.9.0 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/cas-client.rb +29 -2
  2. metadata +2 -3
data/lib/cas-client.rb CHANGED
@@ -1,8 +1,28 @@
1
+ # RubyCAS-Client is a Ruby client library for Yale's Central Authentication Service (CAS) protocol.
2
+ #
3
+ # Author:: Matt Walker, with modification and docs by Matt Zukowski
4
+ # Copyright:: Copyright (c) retained by the authors
5
+ # License:: GNU Lesser General Public License v2.1 (LGPL 2.1)
6
+ # Website:: http://rubyforge.org/projects/rubycas-client
7
+ #
8
+ # This program is free software; you can redistribute it and/or
9
+ # modify it under the terms of the GNU General Public License
10
+ # as published by the Free Software Foundation; either version 2
11
+ # of the License, or (at your option) any later version.
12
+ #
13
+ # This program is distributed in the hope that it will be useful,
14
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ # GNU General Public License for more details.
17
+ #
18
+ # You should have received a copy of the GNU General Public License
19
+ # along with this program; if not, write to the Free Software
20
+ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21
+
22
+
1
23
  require 'net/https'
2
24
  require 'rexml/document'
3
25
 
4
- require 'user'
5
-
6
26
  require 'rubygems'
7
27
  require_gem 'actionpack'
8
28
 
@@ -242,6 +262,13 @@ module CAS
242
262
  return cas_payload
243
263
  end
244
264
 
265
+ # Returns the full URI to the CAS logout page.
266
+ # +service+ can be a full URI where the user should be re-directed after logging out and logging in again.
267
+ # (However it is up to your CAS server's implementation whether to use this parameter for anything)
268
+ def self.cas_logout_uri(service = nil)
269
+ "https://#{CAS.cas_server_host}:#{CAS.cas_server_port}/cas/logout?service=#{service}"
270
+ end
271
+
245
272
  # Setter for @@cas_server_host.
246
273
  def self.cas_server_host; @@cas_server_host; end
247
274
 
metadata CHANGED
@@ -3,12 +3,11 @@ rubygems_version: 0.8.11
3
3
  specification_version: 1
4
4
  name: rubycas-client
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.9.0
7
- date: 2006-09-06 00:00:00 -04:00
6
+ version: 0.9.1
7
+ date: 2006-09-07 00:00:00 -04:00
8
8
  summary: Client library for the CAS single-sign-on protocol.
9
9
  require_paths:
10
10
  - lib
11
- - .
12
11
  email: matt@roughest.net
13
12
  homepage: http://rubycas-client.rubyforge.org
14
13
  rubyforge_project: rubycas-client