Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-08-18 18:12:17 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-08-18 18:12:17 +0300
commitc48bbe6650648fa034696de25983418981e695eb (patch)
tree0dcf30de46ba62585746d9e5f8fa6ceb52df7d28 /lib/gitlab/auth
parentc7b2529418eb0fb802637709eafe8016a4d106b0 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/auth')
-rw-r--r--lib/gitlab/auth/ldap/config.rb14
-rw-r--r--lib/gitlab/auth/o_auth/auth_hash.rb2
-rw-r--r--lib/gitlab/auth/o_auth/provider.rb14
-rw-r--r--lib/gitlab/auth/o_auth/user.rb10
-rw-r--r--lib/gitlab/auth/otp/strategies/forti_authenticator/manual_otp.rb2
5 files changed, 21 insertions, 21 deletions
diff --git a/lib/gitlab/auth/ldap/config.rb b/lib/gitlab/auth/ldap/config.rb
index 82c6411c712..9dafd59561a 100644
--- a/lib/gitlab/auth/ldap/config.rb
+++ b/lib/gitlab/auth/ldap/config.rb
@@ -7,8 +7,8 @@ module Gitlab
class Config
NET_LDAP_ENCRYPTION_METHOD = {
simple_tls: :simple_tls,
- start_tls: :start_tls,
- plain: nil
+ start_tls: :start_tls,
+ plain: nil
}.freeze
attr_accessor :provider, :options
@@ -193,11 +193,11 @@ module Gitlab
def default_attributes
{
- 'username' => %W(#{uid} uid sAMAccountName userid).uniq,
- 'email' => %w(mail email userPrincipalName),
- 'name' => 'cn',
- 'first_name' => 'givenName',
- 'last_name' => 'sn'
+ 'username' => %W(#{uid} uid sAMAccountName userid).uniq,
+ 'email' => %w(mail email userPrincipalName),
+ 'name' => 'cn',
+ 'first_name' => 'givenName',
+ 'last_name' => 'sn'
}
end
diff --git a/lib/gitlab/auth/o_auth/auth_hash.rb b/lib/gitlab/auth/o_auth/auth_hash.rb
index 37f92792d2d..467a933c131 100644
--- a/lib/gitlab/auth/o_auth/auth_hash.rb
+++ b/lib/gitlab/auth/o_auth/auth_hash.rb
@@ -103,7 +103,7 @@ module Gitlab
{
username: username,
- email: email
+ email: email
}
end
end
diff --git a/lib/gitlab/auth/o_auth/provider.rb b/lib/gitlab/auth/o_auth/provider.rb
index 1a25ed10d81..2c2fb743927 100644
--- a/lib/gitlab/auth/o_auth/provider.rb
+++ b/lib/gitlab/auth/o_auth/provider.rb
@@ -5,14 +5,14 @@ module Gitlab
module OAuth
class Provider
LABELS = {
- "alicloud" => "AliCloud",
- "dingtalk" => "DingTalk",
- "github" => "GitHub",
- "gitlab" => "GitLab.com",
- "google_oauth2" => "Google",
- "azure_oauth2" => "Azure AD",
+ "alicloud" => "AliCloud",
+ "dingtalk" => "DingTalk",
+ "github" => "GitHub",
+ "gitlab" => "GitLab.com",
+ "google_oauth2" => "Google",
+ "azure_oauth2" => "Azure AD",
"azure_activedirectory_v2" => "Azure AD v2",
- 'atlassian_oauth2' => 'Atlassian'
+ 'atlassian_oauth2' => 'Atlassian'
}.freeze
def self.authentication(user, provider)
diff --git a/lib/gitlab/auth/o_auth/user.rb b/lib/gitlab/auth/o_auth/user.rb
index 7d9c4c0d7c1..1fed2b263da 100644
--- a/lib/gitlab/auth/o_auth/user.rb
+++ b/lib/gitlab/auth/o_auth/user.rb
@@ -240,11 +240,11 @@ module Gitlab
valid_username = Uniquify.new.string(valid_username) { |s| !NamespacePathValidator.valid_path?(s) }
{
- name: name.strip.presence || valid_username,
- username: valid_username,
- email: email,
- password: auth_hash.password,
- password_confirmation: auth_hash.password,
+ name: name.strip.presence || valid_username,
+ username: valid_username,
+ email: email,
+ password: auth_hash.password,
+ password_confirmation: auth_hash.password,
password_automatically_set: true
}
end
diff --git a/lib/gitlab/auth/otp/strategies/forti_authenticator/manual_otp.rb b/lib/gitlab/auth/otp/strategies/forti_authenticator/manual_otp.rb
index 9cf1b2247a7..88ad48c3db7 100644
--- a/lib/gitlab/auth/otp/strategies/forti_authenticator/manual_otp.rb
+++ b/lib/gitlab/auth/otp/strategies/forti_authenticator/manual_otp.rb
@@ -34,7 +34,7 @@ module Gitlab
end
def body
- { username: user.username,
+ { username: user.username,
token_code: @otp_code }
end