openproject-auth_cas 0.1.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/README.md +62 -0
- data/app/assets/images/auth_cas/tu-darmstadt.png +0 -0
- data/app/assets/images/auth_provider-cas.png +0 -0
- data/lib/open_project/auth_cas.rb +5 -0
- data/lib/open_project/auth_cas/engine.rb +34 -0
- data/lib/open_project/auth_cas/version.rb +5 -0
- data/lib/openproject-auth_cas.rb +1 -0
- metadata +71 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 55c126bb324e209b2130cac91cc3173649e79ab7
|
4
|
+
data.tar.gz: 3bdfc38c6de04fad0f36ff3677b981a4e5146412
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 02d0d3f46d7ec730d0c9b89b5157edad233e4eb20a30a52f9e7a29d1343e2ffe0247ed8fac19e278000439d084e6d2fab50fc20a64eff15690f304165691858b
|
7
|
+
data.tar.gz: f49a0dbb56a42572f22d10cd8ed00f56071ca1ef2dd42bb4d39ca16dca034fe3d8a30fd07279965fa6dd79709fbc0ebaad6a068171530d8c66977945d335ce12
|
data/README.md
ADDED
@@ -0,0 +1,62 @@
|
|
1
|
+
# OpenProject OmniAuth CAS Single-Sign On
|
2
|
+

|
3
|
+
|
4
|
+
[](https://gemnasium.com/oliverguenther/openproject-auth_cas)
|
5
|
+
[](https://codeclimate.com/github/oliverguenther/openproject-auth_cas)
|
6
|
+
|
7
|
+
|
8
|
+
This plugin provides the [OmniAuth CAS strategy](https://github.com/dlindahl/omniauth-cas) into OpenProject.
|
9
|
+
|
10
|
+
## Installation
|
11
|
+
|
12
|
+
Add the following entries to your `Gemfile.plugins` in your OpenProject root directory:
|
13
|
+
|
14
|
+
gem 'openproject-auth_plugins', git: 'https://github.com/opf/openproject-auth_plugins', branch: 'dev'
|
15
|
+
gem "openproject-auth_cas", git: 'https://github.com/oliverguenther/openproject-auth_cas', branch: 'dev'
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
## Requirements
|
20
|
+
|
21
|
+
* [omniauth-cas gem](https://github.com/dlindahl/omniauth-cas) > 1.1.0
|
22
|
+
* [OpenProject](http://openproject.org) > 4.0
|
23
|
+
* [openproject-auth_plugins](https://github.com/opf/openproject-auth_plugins)
|
24
|
+
|
25
|
+
|
26
|
+
## Configuration
|
27
|
+
|
28
|
+
To add your own CAS strategy provider(s), create the following settings file (relative to your OpenProject root):
|
29
|
+
|
30
|
+
config/plugins/auth_cas/settings.yml
|
31
|
+
|
32
|
+
with the following contents:
|
33
|
+
|
34
|
+
your-provider-name:
|
35
|
+
name: "your-provider-name"
|
36
|
+
url: "https://sso.example.org"
|
37
|
+
display_name: "My CAS provider"
|
38
|
+
# Use the default CAS icon
|
39
|
+
icon: "auth_provider-cas.png"
|
40
|
+
# Extended Attributes mapping
|
41
|
+
uid_key: "username"
|
42
|
+
|
43
|
+
The plugin simply passes all options to omniauth-cas. See [their configuration documentation](https://github.com/dlindahl/omniauth-cas#configuration-options) for further details.
|
44
|
+
|
45
|
+
### Multiple Providers
|
46
|
+
|
47
|
+
If you have the use-case of multiple CAS / Single-Sign On providers, simply add several providers to your yaml config, OpenProject will handle the rest automatically.
|
48
|
+
|
49
|
+
|
50
|
+
### Custom Provider Icon
|
51
|
+
|
52
|
+
To add a custom icon to be rendered as your omniauth provider icon, add an image asset to OpenProject and reference it in your `settings.yml`:
|
53
|
+
|
54
|
+
icon: "my/asset/path/to/icon.png"
|
55
|
+
|
56
|
+
|
57
|
+
## Copyrights & License
|
58
|
+
OpenProject CAS Auth is completely free and open source and released under the [MIT License](https://github.com/oliverguenther/openproject-auth_cas/blob/dev/LICENSE).
|
59
|
+
|
60
|
+
Copyright (c) 2014 Oliver Günther (mail@oliverguenther.de)
|
61
|
+
|
62
|
+
The default provider icon is a combination of icons from [Font Awesome by Dave Gandy](http://fontawesome.io).
|
Binary file
|
Binary file
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'omniauth-cas'
|
2
|
+
module OpenProject
|
3
|
+
module AuthCas
|
4
|
+
class Engine < ::Rails::Engine
|
5
|
+
engine_name :openproject_auth_cas
|
6
|
+
|
7
|
+
include OpenProject::Plugins::ActsAsOpEngine
|
8
|
+
extend OpenProject::Plugins::AuthPlugin
|
9
|
+
|
10
|
+
register 'openproject-auth_cas',
|
11
|
+
author_url: 'https://github.com/oliverguenther/openproject-auth_cas',
|
12
|
+
requires_openproject: '>= 4.0.0'
|
13
|
+
|
14
|
+
assets %w(
|
15
|
+
auth_cas/**
|
16
|
+
)
|
17
|
+
|
18
|
+
register_auth_providers do
|
19
|
+
settings = Rails.root.join('config', 'plugins', 'auth_cas', 'settings.yml')
|
20
|
+
if settings.exist?
|
21
|
+
providers = YAML::load(File.open(settings)).symbolize_keys
|
22
|
+
strategy :cas do
|
23
|
+
providers.values.map do |h|
|
24
|
+
h[:openproject_attribute_map] = Proc.new { |auth| { login: auth[:uid] } }
|
25
|
+
h.symbolize_keys
|
26
|
+
end
|
27
|
+
end
|
28
|
+
else
|
29
|
+
Rails.logger.warn("[auth_cas] Missing settings from '#{settings}', skipping omniauth registration.")
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
require 'open_project/auth_cas'
|
metadata
ADDED
@@ -0,0 +1,71 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: openproject-auth_cas
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Oliver Günther
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-06-14 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: omniauth-cas
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.1'
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 1.1.0
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - "~>"
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '1.1'
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 1.1.0
|
33
|
+
description: Adds the OmniAuth CAS provider to OpenProject
|
34
|
+
email: mail@oliverguenther.de
|
35
|
+
executables: []
|
36
|
+
extensions: []
|
37
|
+
extra_rdoc_files: []
|
38
|
+
files:
|
39
|
+
- README.md
|
40
|
+
- app/assets/images/auth_cas/tu-darmstadt.png
|
41
|
+
- app/assets/images/auth_provider-cas.png
|
42
|
+
- lib/open_project/auth_cas.rb
|
43
|
+
- lib/open_project/auth_cas/engine.rb
|
44
|
+
- lib/open_project/auth_cas/version.rb
|
45
|
+
- lib/openproject-auth_cas.rb
|
46
|
+
homepage: https://github.com/oliverguenther/openproject-auth_cas
|
47
|
+
licenses:
|
48
|
+
- MIT
|
49
|
+
metadata: {}
|
50
|
+
post_install_message:
|
51
|
+
rdoc_options: []
|
52
|
+
require_paths:
|
53
|
+
- lib
|
54
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
55
|
+
requirements:
|
56
|
+
- - ">="
|
57
|
+
- !ruby/object:Gem::Version
|
58
|
+
version: '0'
|
59
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
60
|
+
requirements:
|
61
|
+
- - ">="
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: '0'
|
64
|
+
requirements: []
|
65
|
+
rubyforge_project:
|
66
|
+
rubygems_version: 2.4.8
|
67
|
+
signing_key:
|
68
|
+
specification_version: 4
|
69
|
+
summary: OmniAuth CAS / Single-Sign On
|
70
|
+
test_files: []
|
71
|
+
has_rdoc:
|