vitstradal / redmine_remote_user_auth Goto Github PK
View Code? Open in Web Editor NEWAuth by Remote-User-Email HTTP header (with apache conf can allow auth ssl certificates)
Auth by Remote-User-Email HTTP header (with apache conf can allow auth ssl certificates)
Hi,
as mentioned here, the usage of skip_before_filter is deprecated and should be avoided. So the following call doesn't work with the current Rails version.
Regarding this, I have a related question. Is this call necessary at all? The class AccountRemoteUserController is derived from AccountController where (its successor skip_before_action) is called, too:
Sorry, I'm just using this plugin but don't have any Ruby skills...
I needed these changes in app/controllers/account_remote_user_controller.rb for the plugin to work. Otherwise I get
NoMethodError (undefined method `name' for nil:NilClass)
I also needed the 'l(...)'.
unless user && user.active?
flash.now[:error] = l(:notice_account_unknown_email)
return
end
unless user.auth_source.nil? || user.auth_source.name != 'RemoteUser'
successful_authentication(user)
return
end
flash.now[:error] = l(:user_auth_source_not_remote_user);
end
end
Using redmine 2.2.4.
The env var "SSL_CLIENT_S_DN_Email" is specific to Apache (which parses SSL_CLIENT_S_DN), so this plugin can't be used by other httpds like nginx. There should be a generic way to use this plugin (for instance, if Remote-User-Email field is not found, parse X-SSL-Client-DN header).
The parsing can be done easily, take a look at this plugin:
https://github.com/koke/redmine_ssl_auth/blob/master/lib/redmine_ssl_auth/monkey_patches.rb#L28
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.