Migrate to logins using Salsa
- Added
OmniAuth::Builder
with configurations ofdeveloper
andgitlab
strategies inDebci::SelfService
as adding it here enables to use/user/auth/gitlab
as route for Salsa Authentication. - Added
debci_salsa_client_id
anddebci_salsa_client_secret
entry tolib/environment.sh
andDebci::Config
to specify these values forOmniAuth::Builder
. - Added routes
/auth/gitlab/callback
,/auth/failure
to handle callback from Salsa. - Added route
/auth/developer/callback
to handle login callback in developer environment. - Added
login.erb
with both options ofLogin using Salsa
andLogin in Developer Environment
(only present in developer environment) for/user/login
route and updated/user/login
accordingly. - Added
ruby-omniauth-gitlab
indebian/control
. - Updated
login
function inself_service_spec.rb
to login with the use ofmock authentication hash
. - Added migration file to add column
salsa_id
to users table which is used to create new user record now and usernames are updated accordingly. - removed definition of
read_request_user
inapp.rb
since its no longer required. - Update in
spec/spec_helper.rb
to turn on test mode forOmniAuth
. - Updated tests in
spec/debci/api.rb
andspec/debci/self_service_spec.rb
for new changes.
Edited by Pavit Kaur