casablanca 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/README.txt +9 -7
  2. data/lib/casablanca.rb +1 -1
  3. metadata +2 -2
data/README.txt CHANGED
@@ -9,11 +9,11 @@ Casablanca is a ruby single sign-on client for the CAS 2.0 protocol.
9
9
  == FEATURES:
10
10
 
11
11
  * Includes a commandline Client to test getting service tickets from a CAS server
12
- * It can be run as a Rails plugin.
12
+ * It can be run as a Rails plugin
13
+ * Supports gatewaying and renewing
13
14
 
14
15
  == TODO:
15
16
 
16
- * Add extra attributes returned from the server
17
17
  * Implement proxying
18
18
  * Check for single signout
19
19
 
@@ -35,25 +35,27 @@ In IRB:
35
35
 
36
36
 
37
37
  === Rails:
38
- - Configure your Cas server url in environment.rb:
38
+ Configure your Cas server url in environment.rb:
39
39
 
40
40
  Casablanca::Rails::Config.config do |config|
41
41
  config[:cas_server_url] = "http://localhost:4567"
42
42
  end
43
43
 
44
44
 
45
- - Add filters to the protected controllers
46
-
45
+ Add filters to the protected controllers.
47
46
  For most cases you would want the default filter:
47
+
48
48
  before_filter Casablanca::Rails::Filter
49
49
 
50
50
  If you want users without credentials to view the page as well use the Gateway filter
51
+
51
52
  before_filter Casablanca::Rails::GatewayFilter
52
53
 
53
54
  If you want users to always require new credentials for authentication use the renew filter
55
+
54
56
  before_filter Casablanca::Rails::RenewFilter
55
57
 
56
- - Add something like the following to application.rb to get the current user from the Cas session:
58
+ Add something like the following to application.rb to get the current user from the Cas session:
57
59
 
58
60
  def current_user
59
61
  if session[:cas_user] && @user.nil?
@@ -63,7 +65,7 @@ If you want users to always require new credentials for authentication use the r
63
65
  @user
64
66
  end
65
67
 
66
- - Your logout action could look like:
68
+ Your logout action could look like:
67
69
 
68
70
  def logout
69
71
  Casablanca::Rails::Filter.logout(self)
data/lib/casablanca.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Casablanca
2
- VERSION = '0.2.0'
2
+ VERSION = '0.2.1'
3
3
  end
4
4
  require 'casablanca/client'
5
5
  require 'casablanca/response_parsers'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: casablanca
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Petrik de Heus
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-02-20 00:00:00 +01:00
12
+ date: 2009-02-21 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency