ٌٝؗ٦ػحث״وءז倯岀ד鍑嶊 Redmine ೝূػߏΛίʔυͰΧελϚΠζͰ͖Δ1 htpasswdΛಡΜͰೝূ͢ΔίʔυΛ࣮͢Δ͜ͱͰରԠ require 'htauth' class AuthSourceHtpasswd < AuthSource def authenticate(login, password) r = nil HTAuth::PasswdFile.open("/path/to/htpasswd", HTAuth::File::ALTER) do |pf| user = pf.fetch(login) if user && user.authenticated?(password) r = { login: login, auth_source_id: self.id } end end return r rescue => e raise AuthSourceException.new(e.message) end 1 http://www.redmine.org/projects/redmine/wiki/AlternativecustomauthenticationHowTo