Salsa login works
This commit is contained in:
parent
b2ed771663
commit
bc507cbe39
6 changed files with 84 additions and 51 deletions
|
|
@ -11,29 +11,30 @@ class User < ApplicationRecord
|
|||
# :validatable,
|
||||
:timeoutable,
|
||||
# :lockable,
|
||||
:omniauthable, :omniauth_providers => [
|
||||
:launchpad,
|
||||
:stackexchange,
|
||||
:google_oauth2,
|
||||
:amazon,
|
||||
:github
|
||||
:omniauthable, omniauth_providers: [
|
||||
:salsa,
|
||||
# :launchpad,
|
||||
# :stackexchange,
|
||||
# :google_oauth2,
|
||||
# :amazon,
|
||||
# :github
|
||||
]
|
||||
|
||||
# Return a human-friendly string describing the user's SSO provider
|
||||
def pretty_provider
|
||||
case self.provider
|
||||
when 'launchpad'
|
||||
'Ubuntu One/Launchpad'
|
||||
when 'stackexchange'
|
||||
'StackExchange'
|
||||
when 'google_oauth2'
|
||||
'Google'
|
||||
when 'amazon'
|
||||
'Amazon'
|
||||
when 'github'
|
||||
'GitHub'
|
||||
when 'debian-sso'
|
||||
'Debian single-sign-on'
|
||||
# when 'launchpad'
|
||||
# 'Ubuntu One/Launchpad'
|
||||
# when 'stackexchange'
|
||||
# 'StackExchange'
|
||||
# when 'google_oauth2'
|
||||
# 'Google'
|
||||
# when 'amazon'
|
||||
# 'Amazon'
|
||||
# when 'github'
|
||||
# 'GitHub'
|
||||
when 'salsa'
|
||||
'salsa.debian.org'
|
||||
else
|
||||
'local authentication'
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue