CAS OAuth2 plugin/client for Redmine. It allows authentication and creation of users in Redmine using Apereo CAS 5+ as OAuth provider.
This plugin is no longer maintained. Please, feel free to fork and update š
This plugin is used to authenticate Redmine users using CAS OAuth2 provider (āAuthorization Codeā grant type).
It is primarily intended to work with ITMO university ISU system https://isu.ifmo.ru.
Version of CAS: 5.0
Version of Redmine: 3.2.3 (as of publish date, other versions should work as well), 3.3, 3.3.2
cd /path/to/redmine/plugins
git clone https://github.com/pbelikov/redmine-omniauth-oauth-cas.git
mv redmine-omniauth-oauth-cas redmine_omniauth_isu
cd /path/to/redmine
bundle install
IMPORTANT! Plugin is used to work without proxy and to override issues with SSL-certificate.
So, if you use proxy, please go to app/controllers/redmine_oauth_controller.rb
and comment line 7
(which disables proxy). And if your SSL is OK, go to the same file and comment code in line 5 and part of code in line 39.
Yes, I know that this is BAD codestyle, but itāll work for sure.
Restart the app
touch /path/to/redmine/tmp/restart.txt
Users can now use their CASified Account to log in to your instance of Redmine.
User information in CAS /cas/oauth2.0/profile
for successful login or creation of user has following format:
{
"attributes": {
"redmine_login":"ivan",
"redmine_attrs":"Ivan|Ivanov|[email protected]"
},
"id": 123456789
}
This plugin overrides Redmineās autoregistration feature so user is created automatically if all required fields
are provided (login, firstname, lastname, email). Uniqueness of user is checked against login.
Unfortunately, this plugin somehow conflicts with another plugin, called āRedmine Wiki Extensions Pluginā by r-labs.
This plugin is inspired by twinslash plugin Redmine omniauth google.
Please do not hesitatate to contribute to this project. As I know, there is still no official CAS OAuth2 (as client) support in Redmine, so maybe this plugin could help many people. Also I know that code of this plugin is far from good, maybe you could use your Ruby skills to make it better.