Implement PAM on top of gitlab 6-1-stable
Created by: raphendyr
This is working implementation for our environment (as required for now).
I created this PR as a notation that implementing omnitauth stuff in gitlab will eventually render omniauth abstraction useless as code is copied from omniauth gem's to gitlab (lib/gitlab/{ldap,pam}/user.rb
) and thus requires code in gitlab repository for every omniauth backend.
Instead of this we should find a way to fix omniauth in a way that suites our needs. That means we need to implement interface for ldap and pam auhtentication methods. Also we need a way to know how different backends are supposed to be shown on sign in page (button or form).
You can argue that this is not our job (as it's not), but we are the ones who need this fixed.
I had some ideas in omniauth issue, but they didn't want to do those now: https://github.com/intridea/omniauth/issues/691
As gitlab allready uses it's fork for omniauth-ldap, it could fork omniauth and fix these issues for ldap. I very happily implement these on omniauth-pam.