omniauth_uoc_cas 1.0.0
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.
- checksums.yaml +7 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +44 -0
- data/Rakefile +2 -0
- data/lib/omniauth/strategies/uoc_cas.rb +34 -0
- data/lib/omniauth_uoc_cas/version.rb +3 -0
- data/lib/omniauth_uoc_cas.rb +1 -0
- data/omniauth_uoc_cas.gemspec +23 -0
- metadata +94 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 9e07a2376c37f10f3e0a594db2c30d264da1af79
|
4
|
+
data.tar.gz: 8dc9afacc849d4cde97adf6c572240cefd1dd42b
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 19b1b83be9c941aa3085fe12fe91e31bdf6bf114562f72db290a86ec56d0441415923e9d6e3ee845484745954a39cd050415a952a5bce0885f01cf42b2fe54e3
|
7
|
+
data.tar.gz: eef54f730cd3ff994e7b09da8381770c428e494e3c4ee687f8aa00dd179fa9106e2beeab400163795667dd82cc3f6cc15a81adbb238d2e614c4ba2f479b18f28
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2014 rromerogar
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
# omniauth_uoc_cas
|
2
|
+
|
3
|
+
The omniauth_uoc_cas library is an OmniAuth provider that supports authentication against UOC CAS
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
gem 'omniauth', '~> 1.0'
|
10
|
+
gem 'omniauth_uoc_cas'
|
11
|
+
|
12
|
+
And then execute:
|
13
|
+
|
14
|
+
$ bundle
|
15
|
+
|
16
|
+
Or install it yourself as:
|
17
|
+
|
18
|
+
$ gem install omniauth_uoc_cas
|
19
|
+
|
20
|
+
## Usage
|
21
|
+
|
22
|
+
You will need to configure OmniAuth to use your uoc authentication. This is generally done in Rails in the config/initializers/omniauth.rb with:
|
23
|
+
|
24
|
+
Rails.application.config.middleware.use OmniAuth::Builder do
|
25
|
+
provider :uoc_cas
|
26
|
+
end
|
27
|
+
|
28
|
+
## References
|
29
|
+
|
30
|
+
* OmniAuth: https://github.com/intridea/omniauth/
|
31
|
+
* Especially thanks to [Derek Lindahl](https://github.com/dlindahl) and his [omniauth-cas](https://github.com/robdimarco/omniauth-cas). This gem extends his provider.
|
32
|
+
|
33
|
+
## Contributing
|
34
|
+
|
35
|
+
1. Fork it ( https://github.com/rromerogar/omniauth_uoc_cas/fork )
|
36
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
37
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
38
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
39
|
+
5. Create a new Pull Request
|
40
|
+
|
41
|
+
## Copyright
|
42
|
+
|
43
|
+
Copyright (c) 2014 Universitat Oberta de Catalunya. See LICENSE.txt for further details.
|
44
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'omniauth'
|
2
|
+
require 'omniauth-cas'
|
3
|
+
module OmniAuth
|
4
|
+
module Strategies
|
5
|
+
class UocCas < OmniAuth::Strategies::CAS
|
6
|
+
include OmniAuth::Strategy
|
7
|
+
|
8
|
+
def initialize(app, options = {}, &block)
|
9
|
+
options = {
|
10
|
+
:name => :uoc_cas,
|
11
|
+
:host => 'cv.uoc.edu',
|
12
|
+
:login_url => '/webapps/cas/login',
|
13
|
+
:logout_url => '/webapps/cas/logout',
|
14
|
+
:service_validate_url => '/webapps/cas/serviceValidate',
|
15
|
+
:name_key => 'fullName',
|
16
|
+
}.merge(options);
|
17
|
+
|
18
|
+
if Rails.env.staging?
|
19
|
+
options[:host] = 'cv-pre.uoc.edu'
|
20
|
+
options[:disable_ssl_verification] = true
|
21
|
+
options[:ssl] = false
|
22
|
+
end
|
23
|
+
|
24
|
+
if Rails.env.test? of Rails.env.development?
|
25
|
+
options[:host] = 'cv-test.uoc.edu'
|
26
|
+
options[:disable_ssl_verification] = true
|
27
|
+
options[:ssl] = false
|
28
|
+
end
|
29
|
+
|
30
|
+
super(app, options, &block)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
require 'omniauth/strategies/uoc_cas'
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'omniauth_uoc_cas/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'omniauth_uoc_cas'
|
8
|
+
spec.version = OmniauthUocCas::VERSION
|
9
|
+
spec.authors = ['rromerogar']
|
10
|
+
spec.email = ['rromerogar@uoc.edu']
|
11
|
+
spec.summary = %q{ OmniAuth provider that supports authentication against UOC CAS. }
|
12
|
+
spec.homepage = 'http://github.com/rromerogar/omniauth_uoc_cas'
|
13
|
+
spec.license = 'MIT'
|
14
|
+
|
15
|
+
spec.files = `git ls-files -z`.split("\x0")
|
16
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
17
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
18
|
+
spec.require_paths = ['lib']
|
19
|
+
|
20
|
+
spec.add_development_dependency 'bundler', '~> 1.6'
|
21
|
+
spec.add_development_dependency 'rake'
|
22
|
+
spec.add_dependency 'omniauth-cas', '~> 1.0.4'
|
23
|
+
end
|
metadata
ADDED
@@ -0,0 +1,94 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: omniauth_uoc_cas
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- rromerogar
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-06-27 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.6'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.6'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: omniauth-cas
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 1.0.4
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 1.0.4
|
55
|
+
description:
|
56
|
+
email:
|
57
|
+
- rromerogar@uoc.edu
|
58
|
+
executables: []
|
59
|
+
extensions: []
|
60
|
+
extra_rdoc_files: []
|
61
|
+
files:
|
62
|
+
- Gemfile
|
63
|
+
- LICENSE.txt
|
64
|
+
- README.md
|
65
|
+
- Rakefile
|
66
|
+
- lib/omniauth/strategies/uoc_cas.rb
|
67
|
+
- lib/omniauth_uoc_cas.rb
|
68
|
+
- lib/omniauth_uoc_cas/version.rb
|
69
|
+
- omniauth_uoc_cas.gemspec
|
70
|
+
homepage: http://github.com/rromerogar/omniauth_uoc_cas
|
71
|
+
licenses:
|
72
|
+
- MIT
|
73
|
+
metadata: {}
|
74
|
+
post_install_message:
|
75
|
+
rdoc_options: []
|
76
|
+
require_paths:
|
77
|
+
- lib
|
78
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
84
|
+
requirements:
|
85
|
+
- - ">="
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: '0'
|
88
|
+
requirements: []
|
89
|
+
rubyforge_project:
|
90
|
+
rubygems_version: 2.2.2
|
91
|
+
signing_key:
|
92
|
+
specification_version: 4
|
93
|
+
summary: OmniAuth provider that supports authentication against UOC CAS.
|
94
|
+
test_files: []
|