els_bootstrap 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.rdoc CHANGED
@@ -29,14 +29,37 @@ _els_identity_ will not only result in a user cdid, but also their name, email a
29
29
 
30
30
  == How to use it
31
31
 
32
- 1. add the gem to your Gemfile
32
+ *add the gem to your Gemfile
33
33
  gem 'els_bootstrap', "~>0.0.1"
34
34
 
35
- 2. call els_identity in your controller. Example:
36
- class ApplicationController < ActionController::Base
37
- before_filter :els_identity
38
- end
35
+ *tell the plugin about the openAM instance and the cookies it uses. In config/els_token.yml do something like this:
36
+ development:
37
+ uri: https://elsuat-sso.corp.aol.com:443/opensso/identity
38
+ cookie: iPlanetDirectoryProuat
39
+ production:
40
+ uri: https://els-sso.corp.aol.com:443/opensso/identity
41
+ cookie: iPlanetDirectoryPro
42
+
43
+ *call els_identity in your controller. Example:
44
+ class ApplicationController < ActionController::Base
45
+ before_filter :els_identity
46
+ end
47
+
48
+ If you do need to pull up an additional model, you might want to chain a before_filter. For example:
49
+ class ApplicationController < ActionController::Base
50
+ before_filter :els_identity,:my_model
51
+
52
+ def my_model
53
+ if @els_identity
54
+ @my_model ||= MyModel.find_by_name(@els_identity.name)
55
+ end
56
+ end
57
+
58
+ == TODO
59
+
60
+ It would be nice to marshal an, optional, internal model automatically.
61
+ Generator for the els_token.yml config
39
62
 
40
63
  == Contributing
41
64
  Yes please.
42
- fork, hack, send pull request :)
65
+ fork, hack, send pull request :)
@@ -90,5 +90,15 @@ class ElsSessionController < ApplicationController
90
90
  redirect_to session[:redirect_to]
91
91
  end
92
92
  end
93
+
94
+ class ElsFaker < ElsToken::ElsIdentity
95
+ attr_accessor :cdid, :token_id
96
+ def initialize(cdid)
97
+ super
98
+ @cdid = cdid
99
+ @token_id = Random.rand
100
+ end
101
+ end
102
+
93
103
 
94
104
  end
@@ -1,3 +1,3 @@
1
1
  module ElsBootstrap
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: els_bootstrap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: