-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathREADME
87 lines (61 loc) · 2.87 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
WARNING! No longer under active development
Feel free to submit patches via pull requests. I will review them and merge.
For redmine 1.4 and older, see the right branch/tag, this one is suitable for 2.2
MultiPass SSO Authentication plugin for Redmine (v 0.0.1)
=======
This plugin is based on MultiPass gem (https://github.com/entp/multipass) and allows
users to register and login to the application with Single Sign On (SSO) link.
Configuration on both sides (Redmine and Custom app) is needed. Please read Configuration
instruction.
Requirements
=======
This plugin requires MultiPass gem installed.
gem install multipass
For redmine 1.3 and newer:
Edit your Gemfile and add there
gem 'multipass'
Installation
=======
1. cd plugins; git clone git://github.com/jozefvaclavik/redmine_multipass.git
2. cd ..; rake redmine:plugins:migrate RAILS_ENV=production
3. restart redmine
Edit config/routes.rb and add these four lines AFTER first line.
match 'multipass', :controller => 'multipass', :action => 'index'
match 'multipass/index', :controller => 'multipass', :action => 'index'
match 'multipass/successful_authentication', :controller => 'multipass', :action => 'successful_authentication'
match 'multipass/register', :controller => 'multipass', :action => 'register'
Configuration
=======
Redmine:
- Enable => Enable/Disable plugin.
- Debug Mode => Enable/Disable debug mode. While enabled, instead of proceeding
User information to login/register, decrypted information are displayed.
- Self Registration => Enalbe/Disable registration mode.
- Support Email => Contact information in case that SSO Auth will fail to login/register
- Group => User group, where newly created users will be added
- SSO Api Key => SSO Key for encryption/decryption
- Site Key => Site key used for encryption/decryption
Custom app: EXAMPLE USSAGE
- In User.rb model:
site_key and sso_api_key are string values from redmine settings
def self.multipass
@multipass ||= MultiPass.new(site_key, sso_api_key)
end
# create a multipass for this user object
def multipass
users_remote_uid = "#{site_key}_#{id}"
user_mail = "Obtain users email"
user_first_name = "Obtain users first name"
user_last_name = "Obtain users last name"
user_login = "Obtain users login"
self.class.multipass.encode(:email => user_mail, :first_name => user_first_name, :last_name => user_last_name, :login => user_login, :remote_uid => users_remote_uid, :expires => 30.minutes.from_now)
end
- In your view:
Assume that @user is currently logged in user
<%= link_to( "Open Redmine", "http://link_to_your_redmine_app/multipass/?sso=#{CGI.escape(@user.multipass)}") %>
PHP Support:
If your custom application is based on PHP, take a look at Tomdchi PHP version of multipass library. https://github.com/tomdchi/Redmine-PHP-MultiPass
Known issues
=======
So far, none :-)
Copyright (c) 2010 NIIF Institute and Adam Lantos, released under the MIT license