PageRenderTime 7991ms queryTime 912ms sortTime 1ms getByIdsTime 203ms findMatchingLines 1393ms

100+ results results for 'gitlab oauth2' (7991 ms)

Not the results you expected?
README.md https://gitlab.com/jacobvosmaer-gitlab/gitlab-ce | Markdown | 392 lines
                    
3Automate GitLab via a simple and powerful API. All definitions can be found
                    
4under [`/lib/api`](https://gitlab.com/gitlab-org/gitlab-ce/tree/master/lib/api).
                    
5
                    
94
                    
95Read more about [GitLab as an OAuth2 client](oauth2.md).
                    
96
                    
261Date: Mon, 18 Jan 2016 09:43:18 GMT
                    
262Link: <https://gitlab.example.com/api/v4/projects/8/issues/8/notes?page=1&per_page=3>; rel="prev", <https://gitlab.example.com/api/v4/projects/8/issues/8/notes?page=3&per_page=3>; rel="next", <https://gitlab.example.com/api/v4/projects/8/issues/8/notes?page=1&per_page=3>; rel="first", <https://gitlab.example.com/api/v4/projects/8/issues/8/notes?page=3&per_page=3>; rel="last"
                    
263Status: 200 OK
                    
388
                    
389[GitLab website]: https://about.gitlab.com/applications/#api-clients "Clients using the GitLab API"
                    
390[lib-api-url]: https://gitlab.com/gitlab-org/gitlab-ce/tree/master/lib/api/api.rb
                    
391[ce-3749]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3749
                    
392[ce-5951]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5951
                    
393
                    
                
omniauth.md https://gitlab.com/siemens/gitlab-ce | Markdown | 330 lines
                    
12- [Enable OmniAuth for an Existing User](#enable-omniauth-for-an-existing-user)
                    
13- [OmniAuth configuration sample when using Omnibus GitLab](https://gitlab.com/gitlab-org/omnibus-gitlab/tree/master#omniauth-google-twitter-github-login)
                    
14- [Enable or disable Sign In with an OmniAuth provider without disabling import sources](#enable-or-disable-sign-in-with-an-omniauth-provider-without-disabling-import-sources)
                    
23- [Bitbucket](bitbucket.md)
                    
24- [GitLab.com](gitlab.md)
                    
25- [Google](google.md)
                    
163```ruby
                    
164gitlab_rails['omniauth_external_providers'] = ['twitter', 'google_oauth2']
                    
165```
                    
194
                    
195- Add the gem to your [Gemfile](https://gitlab.com/gitlab-org/gitlab/blob/master/Gemfile):
                    
196
                    
314```ruby
                    
315gitlab_rails['omniauth_auto_sign_in_with_provider'] = 'azure_oauth2'
                    
316```
                    
                
omniauth.md https://gitlab.com/tancnle/gitlab-ce | Markdown | 330 lines
                    
12- [Enable OmniAuth for an Existing User](#enable-omniauth-for-an-existing-user)
                    
13- [OmniAuth configuration sample when using Omnibus GitLab](https://gitlab.com/gitlab-org/omnibus-gitlab/tree/master#omniauth-google-twitter-github-login)
                    
14- [Enable or disable Sign In with an OmniAuth provider without disabling import sources](#enable-or-disable-sign-in-with-an-omniauth-provider-without-disabling-import-sources)
                    
23- [Bitbucket](bitbucket.md)
                    
24- [GitLab.com](gitlab.md)
                    
25- [Google](google.md)
                    
163```ruby
                    
164gitlab_rails['omniauth_external_providers'] = ['twitter', 'google_oauth2']
                    
165```
                    
194
                    
195- Add the gem to your [Gemfile](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/Gemfile):
                    
196
                    
314```ruby
                    
315gitlab_rails['omniauth_auto_sign_in_with_provider'] = 'azure_oauth2'
                    
316```
                    
                
git_http_spec.rb https://gitlab.com/hugi2002/gitlab-ce | Ruby | 395 lines
                    
85          it "responds with status 404" do
                    
86            allow(Gitlab.config.gitlab_shell).to receive(:receive_pack).and_return(false)
                    
87
                    
96        it "responds with status 404" do
                    
97          allow(Gitlab.config.gitlab_shell).to receive(:upload_pack).and_return(false)
                    
98
                    
188              it "downloads get status 200" do
                    
189                clone_get "#{project.path_with_namespace}.git", user: 'oauth2', password: @token.token
                    
190
                    
194              it "uploads get status 401 (no project existence information leak)" do
                    
195                push_get "#{project.path_with_namespace}.git", user: 'oauth2', password: @token.token
                    
196
                    
208              it "repeated attempts followed by successful attempt" do
                    
209                options = Gitlab.config.rack_attack.git_basic_auth
                    
210                maxretry = options[:maxretry] - 1
                    
                
Gemfile https://gitlab.com/axil/gitlab-ee.git | Gemfile | 303 lines
                    
23gem 'omniauth-github',        '~> 1.1.1'
                    
24gem 'omniauth-gitlab',        '~> 1.0.0'
                    
25gem 'omniauth-google-oauth2', '~> 0.2.0'
                    
31gem 'gssapi', group: :kerberos
                    
32gem 'rack-oauth2',            '~> 1.0.5'
                    
33
                    
42# Extracting information from a git repository
                    
43# Provide access to Gitlab::Git library
                    
44gem "gitlab_git", '~> 7.2.20'
                    
46# LDAP Auth
                    
47# GitLab fork with several improvements to original library. For full list of changes
                    
48# see https://github.com/intridea/omniauth-ldap/compare/master...gitlabhq:master
                    
48# see https://github.com/intridea/omniauth-ldap/compare/master...gitlabhq:master
                    
49gem 'gitlab_omniauth-ldap', '~> 1.2.1', require: "omniauth-ldap"
                    
50gem 'net-ldap'
                    
                
api_guard.rb https://gitlab.com/markglenfletcher/gitlab-ce | Ruby | 144 lines
                    
80      def api_access_allowed?(user)
                    
81        Gitlab::UserAccess.new(user).allowed? && user.can?(:access_api)
                    
82      end
                    
99
                    
100        base.__send__(:rescue_from, *error_classes, oauth2_bearer_token_error_handler) # rubocop:disable GitlabSecurity/PublicSend
                    
101      end
                    
102
                    
103      def oauth2_bearer_token_error_handler
                    
104        proc do |e|
                    
106            case e
                    
107            when Gitlab::Auth::MissingTokenError
                    
108              Rack::OAuth2::Server::Resource::Bearer::Unauthorized.new
                    
134                :insufficient_scope,
                    
135                Rack::OAuth2::Server::Resource::ErrorMethods::DEFAULT_DESCRIPTION[:insufficient_scope],
                    
136                { scope: e.scopes })
                    
                
doorkeeper.rb https://gitlab.com/amri1200/gitlab-ce | Ruby | 102 lines
                    
14  resource_owner_from_credentials do |routes|
                    
15    Gitlab::Auth.new.find(params[:username], params[:password])
                    
16  end
                    
39  # Forces the usage of the HTTPS protocol in non-native redirect uris (enabled
                    
40  # by default in non-development environments). OAuth2 delegates security in
                    
41  # communication to the HTTPS protocol so it is wise to keep this enabled.
                    
71  # The value can be any string. Use nil to disable this feature. When disabled, clients must provide a valid URL
                    
72  # (Similar behaviour: https://developers.google.com/accounts/docs/OAuth2InstalledApp#choosingredirecturi)
                    
73  #
                    
                
README.md https://gitlab.com/daniel.hoffmann/gitlab-ee | Markdown | 94 lines
                    
5- [API](api/README.md) Automate GitLab via a simple and powerful API.
                    
6- [GitLab as OAuth2 authentication service provider](integration/oauth_provider.md). It allows you to login to other applications from GitLab.
                    
7- [GitLab Basics](gitlab-basics/README.md) Find step by step how to start working on your commandline and on GitLab.
                    
18- [Workflow](workflow/README.md) Using GitLab functionality and importing projects from GitHub and SVN.
                    
19- [GitLab Pages](pages/README.md) Using GitLab Pages.
                    
20- [Custom templates for issues and merge requests](customization/issue_and_merge_request_template.md) Pre-fill the description of issues and merge requests to your liking.
                    
64- [Install](install/README.md) Requirements, directory structures and installation from source.
                    
65- [Restart GitLab](administration/restart_gitlab.md) Learn how to restart GitLab and its components
                    
66- [Installing your license](license/README.md)
                    
78- [Reply by email](incoming_email/README.md) Allow users to comment on issues and merge requests by replying to notification emails.
                    
79- [Migrate GitLab CI to CE/EE](migrate_ci_to_ce/README.md) Follow this guide to migrate your existing GitLab CI data to GitLab CE/EE.
                    
80- [Downgrade back to CE](downgrade_ee_to_ce/README.md) Follow this guide if you need to downgrade from EE to CE.
                    
85- [Elasticsearch](integration/elasticsearch.md) Enable Elasticsearch
                    
86- [GitLab Performance Monitoring](monitoring/performance/introduction.md) Configure GitLab and InfluxDB for measuring performance metrics
                    
87
                    
                
README.md https://gitlab.com/leftathome/gitlab-ee | Markdown | 326 lines
                    
3Automate GitLab via a simple and powerful API. All definitions can be found
                    
4under [`/lib/api`](https://gitlab.com/gitlab-org/gitlab-ce/tree/master/lib/api).
                    
5
                    
74
                    
75Instead of the `private_token` you can transmit the OAuth2 access token as a
                    
76header or as a parameter.
                    
89
                    
90Read more about [GitLab as an OAuth2 client](oauth2.md).
                    
91
                    
210Date: Mon, 18 Jan 2016 09:43:18 GMT
                    
211Link: <https://gitlab.example.com/api/v3/projects/8/issues/8/notes?page=1&per_page=3>; rel="prev", <https://gitlab.example.com/api/v3/projects/8/issues/8/notes?page=3&per_page=3>; rel="next", <https://gitlab.example.com/api/v3/projects/8/issues/8/notes?page=1&per_page=3>; rel="first", <https://gitlab.example.com/api/v3/projects/8/issues/8/notes?page=3&per_page=3>; rel="last"
                    
212Status: 200 OK
                    
324
                    
325[GitLab website]: https://about.gitlab.com/applications/#api-clients "Clients using the GitLab API"
                    
326[lib-api-url]: https://gitlab.com/gitlab-org/gitlab-ce/tree/master/lib/api/api.rb
                    
                
Gemfile https://gitlab.com/axil/gitlab | Gemfile | 523 lines
                    
25gem 'devise', '~> 4.7.2'
                    
26# TODO: verify ARM compile issue on 3.1.13+ version (see https://gitlab.com/gitlab-org/gitlab/-/merge_requests/18828)
                    
27gem 'bcrypt', '3.1.12'
                    
89gem 'graphql', '~> 1.11.4'
                    
90# NOTE: graphiql-rails v1.5+ doesn't work: https://gitlab.com/gitlab-org/gitlab/issues/31771
                    
91# TODO: remove app/views/graphiql/rails/editors/show.html.erb when https://github.com/rmosolgo/graphiql-rails/pull/71 is released:
                    
423
                    
424  # Moved in `test` because https://gitlab.com/gitlab-org/gitlab/-/issues/217527
                    
425  gem 'derailed_benchmarks', require: false
                    
429
                    
430# https://gitlab.com/gitlab-org/gitlab/issues/207207
                    
431gem 'gitlab-mail_room', '~> 0.0.8', require: 'mail_room'
                    
500# Monkey-patched in `config/initializers/mail_encoding_patch.rb`
                    
501# See https://gitlab.com/gitlab-org/gitlab/issues/197386
                    
502gem 'mail', '= 2.7.1'
                    
                
Gemfile https://gitlab.com/cuongtm/gitlab-ee | Gemfile | 343 lines
                    
9# Specify a sprockets version due to increased performance
                    
10# See https://gitlab.com/gitlab-org/gitlab-ce/issues/6069
                    
11gem 'sprockets', '~> 3.6.0'
                    
25gem 'omniauth-auth0',         '~> 1.4.1'
                    
26gem 'omniauth-azure-oauth2',  '~> 0.0.6'
                    
27gem 'omniauth-bitbucket',     '~> 0.0.2'
                    
30gem 'omniauth-github',        '~> 1.1.1'
                    
31gem 'omniauth-gitlab',        '~> 1.0.0'
                    
32gem 'omniauth-google-oauth2', '~> 0.2.0'
                    
38gem 'gssapi', group: :kerberos
                    
39gem 'rack-oauth2',            '~> 1.2.1'
                    
40
                    
49
                    
50# GitLab Pages
                    
51gem 'validates_hostname', '~> 1.0.0'
                    
                
Gemfile https://gitlab.com/nulldoxyz/gitlab-ce | Gemfile | 423 lines
                    
28gem 'omniauth-auth0', '~> 1.4.1'
                    
29gem 'omniauth-azure-oauth2', '~> 0.0.9'
                    
30gem 'omniauth-cas3', '~> 1.1.4'
                    
32gem 'omniauth-github', '~> 1.1.1'
                    
33gem 'omniauth-gitlab', '~> 1.0.2'
                    
34gem 'omniauth-google-oauth2', '~> 0.5.2'
                    
35gem 'omniauth-kerberos', '~> 0.3.0', group: :kerberos
                    
36gem 'omniauth-oauth2-generic', '~> 0.2.2'
                    
37gem 'omniauth-saml', '~> 1.7.0'
                    
41gem 'omniauth-authentiq', '~> 0.3.1'
                    
42gem 'rack-oauth2', '~> 1.2.1'
                    
43gem 'jwt', '~> 1.5.6'
                    
54
                    
55# GitLab Pages
                    
56gem 'validates_hostname', '~> 1.0.6'
                    
                
google.md https://gitlab.com/jacobvosmaer-gitlab/gitlab-ce | Markdown | 93 lines
                    
25    - Application type: "Web Application"
                    
26    - Authorized JavaScript origins: This isn't really used by GitLab but go ahead and put 'https://gitlab.example.com' here.
                    
27    - Authorized redirect URI: 'https://gitlab.example.com/users/auth/google_oauth2/callback'
                    
34    ```sh
                    
35      sudo editor /etc/gitlab/gitlab.rb
                    
36    ```
                    
40    ```sh
                    
41      cd /home/git/gitlab
                    
42
                    
79
                    
80On the sign in page there should now be a Google icon below the regular sign in form. Click the icon to begin the authentication process. Google will ask the user to sign in and authorize the GitLab application. If everything goes well the user will be returned to GitLab and will be signed in.
                    
81
                    
92[reconfigure]: ../administration/restart_gitlab.md#omnibus-gitlab-reconfigure
                    
93[restart GitLab]: ../administration/restart_gitlab.md#installations-from-source
                    
94
                    
                
README.md https://gitlab.com/jastkand/gitlab-ce | Markdown | 68 lines
                    
11- [CI/CD](ci/README.md) GitLab Continuous Integration (CI) and Continuous Delivery (CD) getting started, `.gitlab-ci.yml` options, and examples.
                    
12- [GitLab as OAuth2 authentication service provider](integration/oauth_provider.md). It allows you to login to other applications from GitLab.
                    
13- [Container Registry](user/project/container_registry.md) Learn how to use GitLab Container Registry.
                    
13- [Container Registry](user/project/container_registry.md) Learn how to use GitLab Container Registry.
                    
14- [GitLab basics](gitlab-basics/README.md) Find step by step how to start working on your commandline and on GitLab.
                    
15- [Importing to GitLab](workflow/importing/README.md) Import your projects from GitHub, Bitbucket, GitLab.com, FogBugz and SVN into GitLab.
                    
26- [Git Attributes](user/project/git_attributes.md) Managing Git attributes using a `.gitattributes` file.
                    
27- [Git cheatsheet](https://gitlab.com/gitlab-com/marketing/raw/master/design/print/git-cheatsheet/print-pdf/git-cheatsheet.pdf) Download a PDF describing the most used Git operations.
                    
28
                    
35- [Install](install/README.md) Requirements, directory structures and installation from source.
                    
36- [Restart GitLab](administration/restart_gitlab.md) Learn how to restart GitLab and its components.
                    
37- [Integration](integration/README.md) How to integrate with systems such as JIRA, Redmine, Twitter.
                    
52- [Reply by email](administration/reply_by_email.md) Allow users to comment on issues and merge requests by replying to notification emails.
                    
53- [Migrate GitLab CI to CE/EE](migrate_ci_to_ce/README.md) Follow this guide to migrate your existing GitLab CI data to GitLab CE/EE.
                    
54- [Git LFS configuration](workflow/lfs/lfs_administration.md)
                    
                
Gemfile https://gitlab.com/truongsinh/gitlab-ce | Gemfile | 355 lines
                    
25gem 'omniauth-auth0', '~> 1.4.1'
                    
26gem 'omniauth-azure-oauth2', '~> 0.0.6'
                    
27gem 'omniauth-cas3', '~> 1.1.2'
                    
29gem 'omniauth-github', '~> 1.1.1'
                    
30gem 'omniauth-gitlab', '~> 1.0.2'
                    
31gem 'omniauth-google-oauth2', '~> 0.4.1'
                    
32gem 'omniauth-kerberos', '~> 0.3.0', group: :kerberos
                    
33gem 'omniauth-oauth2-generic', '~> 0.2.2'
                    
34gem 'omniauth-saml', '~> 1.7.0'
                    
38gem 'omniauth-authentiq', '~> 0.3.0'
                    
39gem 'rack-oauth2', '~> 1.2.1'
                    
40gem 'jwt', '~> 1.5.6'
                    
51
                    
52# GitLab Pages
                    
53gem 'validates_hostname', '~> 1.0.6'
                    
                
gitlab_controller.rb https://gitlab.com/shellyvention/gitlab-ce | Ruby | 74 lines
                    
7
                    
8  rescue_from OAuth2::Error, with: :gitlab_unauthorized
                    
9
                    
10  def callback
                    
11    session[:gitlab_access_token] = client.get_token(params[:code], callback_import_gitlab_url)
                    
12    redirect_to status_import_gitlab_url
                    
34    if current_user.can?(:create_projects, target_namespace)
                    
35      project = Gitlab::GitlabImport::ProjectCreator.new(repo, target_namespace, current_user, access_params).execute
                    
36
                    
49  def client
                    
50    @client ||= Gitlab::GitlabImport::Client.new(session[:gitlab_access_token])
                    
51  end
                    
71  def access_params
                    
72    { gitlab_access_token: session[:gitlab_access_token] }
                    
73  end
                    
                
omniauth_callbacks_controller.rb https://gitlab.com/axil/gitlab | Ruby | 292 lines
                    
16  def handle_omniauth
                    
17    omniauth_flow(Gitlab::Auth::OAuth)
                    
18  end
                    
48  def saml
                    
49    omniauth_flow(Gitlab::Auth::Saml)
                    
50  rescue Gitlab::Auth::Saml::IdentityLinker::UnverifiedRequest
                    
86
                    
87  def atlassian_oauth2
                    
88    omniauth_flow(Gitlab::Auth::Atlassian)
                    
150  def handle_service_ticket(provider, ticket)
                    
151    Gitlab::Auth::OAuth::Session.create provider, ticket
                    
152    session[:service_tickets] ||= {}
                    
181    end
                    
182  rescue Gitlab::Auth::OAuth::User::SigninDisabledForProviderError
                    
183    handle_disabled_provider
                    
                
README.md https://gitlab.com/dblessing/gitlab-ee.git | Markdown | 384 lines
                    
3Automate GitLab via a simple and powerful API. All definitions can be found
                    
4under [`/lib/api`](https://gitlab.com/gitlab-org/gitlab-ce/tree/master/lib/api).
                    
5
                    
95
                    
96Read more about [GitLab as an OAuth2 client](oauth2.md).
                    
97
                    
254Date: Mon, 18 Jan 2016 09:43:18 GMT
                    
255Link: <https://gitlab.example.com/api/v3/projects/8/issues/8/notes?page=1&per_page=3>; rel="prev", <https://gitlab.example.com/api/v3/projects/8/issues/8/notes?page=3&per_page=3>; rel="next", <https://gitlab.example.com/api/v3/projects/8/issues/8/notes?page=1&per_page=3>; rel="first", <https://gitlab.example.com/api/v3/projects/8/issues/8/notes?page=3&per_page=3>; rel="last"
                    
256Status: 200 OK
                    
381
                    
382[GitLab website]: https://about.gitlab.com/applications/#api-clients "Clients using the GitLab API"
                    
383[lib-api-url]: https://gitlab.com/gitlab-org/gitlab-ce/tree/master/lib/api/api.rb
                    
383[lib-api-url]: https://gitlab.com/gitlab-org/gitlab-ce/tree/master/lib/api/api.rb
                    
384[ce-3749]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/3749
                    
385
                    
                
auth_spec.rb https://gitlab.com/tbalthazar/gitlab-ce | Ruby | 177 lines
                    
2
                    
3describe Gitlab::Auth, lib: true do
                    
4  let(:gl_auth) { described_class }
                    
24
                    
25          expect(subject).to eq(Gitlab::Auth::Result.new(build.user, build.project, :build, build_authentication_abilities))
                    
26        end
                    
60      expect(gl_auth).to receive(:rate_limit!).with(ip, success: true, login: user.username)
                    
61      expect(gl_auth.find_for_git_client(user.username, 'password', project: nil, ip: ip)).to eq(Gitlab::Auth::Result.new(user, nil, :gitlab_or_ldap, full_authentication_abilities))
                    
62    end
                    
75      ip = 'ip'
                    
76      token = Gitlab::LfsToken.new(key).token
                    
77
                    
88      expect(gl_auth).to receive(:rate_limit!).with(ip, success: true, login: 'oauth2')
                    
89      expect(gl_auth.find_for_git_client("oauth2", token.token, project: nil, ip: ip)).to eq(Gitlab::Auth::Result.new(user, nil, :oauth, read_authentication_abilities))
                    
90    end
                    
                
Gemfile https://gitlab.com/Clusterfack/gitlab-ce.git | Gemfile | 278 lines
                    
40# Provide access to Gitlab::Git library
                    
41gem "gitlab_git", '~> 7.2.15'
                    
42
                    
43# Ruby/Rack Git Smart-HTTP Server Handler
                    
44# GitLab fork with a lot of changes (improved thread-safety, better memory usage etc)
                    
45# For full list of changes see https://github.com/SaitoWu/grack/compare/master...gitlabhq:master
                    
50# see https://github.com/intridea/omniauth-ldap/compare/master...gitlabhq:master
                    
51gem 'gitlab_omniauth-ldap', '1.2.1', require: "omniauth-ldap"
                    
52
                    
56# Language detection
                    
57# GitLab fork of linguist does not require pygments/python dependency.
                    
58# New version of original gem also dropped pygments support but it has strict
                    
59# dependency to unstable rugged version. We have internal issue for replacing
                    
60# fork with original gem when we meet on same rugged version - https://dev.gitlab.org/gitlab/gitlabhq/issues/2052.
                    
61gem "gitlab-linguist", "~> 3.0.1", require: "linguist"
                    
                
Gemfile https://gitlab.com/sijis/gitlab-ee.git | Gemfile | 278 lines
                    
40# Provide access to Gitlab::Git library
                    
41gem "gitlab_git", '~> 7.2.5'
                    
42
                    
43# Ruby/Rack Git Smart-HTTP Server Handler
                    
44# GitLab fork with a lot of changes (improved thread-safety, better memory usage etc)
                    
45# For full list of changes see https://github.com/SaitoWu/grack/compare/master...gitlabhq:master
                    
50# see https://github.com/intridea/omniauth-ldap/compare/master...gitlabhq:master
                    
51gem 'gitlab_omniauth-ldap', '1.2.1', require: "omniauth-ldap"
                    
52gem 'net-ldap'
                    
60# dependency to unstable rugged version. We have internal issue for replacing 
                    
61# fork with original gem when we meet on same rugged version - https://dev.gitlab.org/gitlab/gitlabhq/issues/2052.
                    
62gem "gitlab-linguist", "~> 3.0.1", require: "linguist"
                    
271group :production do
                    
272  gem "gitlab_meta", '7.0'
                    
273end
                    
                
README.md https://gitlab.com/jediii/gitlab-ce | Markdown | 74 lines
                    
5- [API](api/README.md) Automate GitLab via a simple and powerful API.
                    
6- [GitLab as OAuth2 authentication service provider](integration/oauth_provider.md). It allows you to login to other applications from GitLab.
                    
7- [GitLab Basics](gitlab-basics/README.md) Find step by step how to start working on your commandline and on GitLab.
                    
8- [Importing to GitLab](workflow/importing/README.md).
                    
9- [Markdown](markdown/markdown.md) GitLab's advanced formatting system.
                    
10- [Migrating from SVN](migration/README.md) Convert a SVN repository to Git and GitLab
                    
15- [SSH](ssh/README.md) Setup your ssh keys and deploy keys for secure access to your projects.
                    
16- [Web hooks](web_hooks/web_hooks.md) Let GitLab notify you when new code has been pushed to your project.
                    
17- [Workflow](workflow/README.md) Using GitLab functionality and importing projects from GitHub and SVN.
                    
21- [Quick Start](ci/quick_start/README.md)
                    
22- [Configuring project (.gitlab-ci.yml)](ci/yaml/README.md)
                    
23- [Configuring runner](ci/runners/README.md)
                    
66- [Reply by email](incoming_email/README.md) Allow users to comment on issues and merge requests by replying to notification emails.
                    
67- [Migrate GitLab CI to CE/EE](migrate_ci_to_ce/README.md) Follow this guide to migrate your existing GitLab CI data to GitLab CE/EE.
                    
68- [Git LFS configuration](workflow/lfs/lfs_administration.md)
                    
                
README.md https://gitlab.com/Hubbitus/gitlab-ee | Markdown | 67 lines
                    
6- [CI](ci/README.md) GitLab Continuous Integration (CI) getting started, `.gitlab-ci.yml` options, and examples.
                    
7- [GitLab as OAuth2 authentication service provider](integration/oauth_provider.md). It allows you to login to other applications from GitLab.
                    
8- [GitLab Basics](gitlab-basics/README.md) Find step by step how to start working on your commandline and on GitLab.
                    
19- [Workflow](workflow/README.md) Using GitLab functionality and importing projects from GitHub and SVN.
                    
20- [GitLab Pages](pages/README.md) Using GitLab Pages.
                    
21- [Custom templates for issues and merge requests](customization/issue_and_merge_request_template.md) Pre-fill the description of issues and merge requests to your liking.
                    
35- [Integration](integration/README.md) How to integrate with systems such as JIRA, Redmine, LDAP and Twitter.
                    
36- [Restart GitLab](administration/restart_gitlab.md) Learn how to restart GitLab and its components
                    
37- [Issue closing](customization/issue_closing.md) Customize how to close an issue from commit messages.
                    
48- [Reply by email](incoming_email/README.md) Allow users to comment on issues and merge requests by replying to notification emails.
                    
49- [Migrate GitLab CI to CE/EE](migrate_ci_to_ce/README.md) Follow this guide to migrate your existing GitLab CI data to GitLab CE/EE.
                    
50- [Downgrade back to CE](downgrade_ee_to_ce/README.md) Follow this guide if you need to downgrade from EE to CE.
                    
58- [High Availability](administration/high_availability/README.md) Configure multiple servers for scaling or high availability
                    
59- [GitLab GEO](gitlab-geo/README.md) Configure GitLab GEO, a
                    
60  secondary read-only GitLab instance
                    
                
Gemfile https://gitlab.com/davidhooey/gitlab-ce.git | Gemfile | 235 lines
                    
28gem 'omniauth', "~> 1.1.3"
                    
29gem 'omniauth-google-oauth2'
                    
30gem 'omniauth-twitter'
                    
33# Extracting information from a git repository
                    
34# Provide access to Gitlab::Git library
                    
35gem "gitlab_git", '~> 5.7.1'
                    
37# Ruby/Rack Git Smart-HTTP Server Handler
                    
38gem 'gitlab-grack', '~> 2.0.0.pre', require: 'grack'
                    
39
                    
40# LDAP Auth
                    
41gem 'gitlab_omniauth-ldap', '1.0.4', require: "omniauth-ldap"
                    
42
                    
43# Git Wiki
                    
44gem "gitlab-gollum-lib", "~> 1.1.0", require: 'gollum-lib'
                    
45
                    
                
Gemfile https://gitlab.com/rajeshgalla/gitlab-ce.git | Gemfile | 278 lines
                    
40# Provide access to Gitlab::Git library
                    
41gem "gitlab_git", '~> 7.2.14'
                    
42
                    
43# Ruby/Rack Git Smart-HTTP Server Handler
                    
44# GitLab fork with a lot of changes (improved thread-safety, better memory usage etc)
                    
45# For full list of changes see https://github.com/SaitoWu/grack/compare/master...gitlabhq:master
                    
50# see https://github.com/intridea/omniauth-ldap/compare/master...gitlabhq:master
                    
51gem 'gitlab_omniauth-ldap', '1.2.1', require: "omniauth-ldap"
                    
52
                    
56# Language detection
                    
57# GitLab fork of linguist does not require pygments/python dependency.
                    
58# New version of original gem also dropped pygments support but it has strict
                    
59# dependency to unstable rugged version. We have internal issue for replacing
                    
60# fork with original gem when we meet on same rugged version - https://dev.gitlab.org/gitlab/gitlabhq/issues/2052.
                    
61gem "gitlab-linguist", "~> 3.0.1", require: "linguist"
                    
                
google.md https://gitlab.com/rymai/gitlab | Markdown | 120 lines
                    
31     ```
                    
32     https://gitlab.example.com/users/auth/google_oauth2/callback
                    
33     https://gitlab.example.com/-/google_api/auth/callback
                    
57   ```shell
                    
58   sudo editor /etc/gitlab/gitlab.rb
                    
59   ```
                    
70
                    
71   For Omnibus GitLab:
                    
72
                    
86   ```yaml
                    
87   - { name: 'google_oauth2', app_id: 'YOUR_APP_ID',
                    
88     app_secret: 'YOUR_APP_SECRET',
                    
119[reconfigure]: ../administration/restart_gitlab.md#omnibus-gitlab-reconfigure
                    
120[restart GitLab]: ../administration/restart_gitlab.md#installations-from-source
                    
121
                    
                
wiki_pipeline.rb https://gitlab.com/sandish/gitlab-ce | Ruby | 55 lines
                    
22          wiki = context.portable.wiki
                    
23          url = data[:url].sub("://", "://oauth2:#{context.configuration.access_token}@")
                    
24
                    
24
                    
25          Gitlab::UrlBlocker.validate!(url, allow_local_network: allow_local_requests?, allow_localhost: allow_local_requests?)
                    
26
                    
35          root = context.configuration.url
                    
36          Gitlab::Utils.append_path(root, wiki_path)
                    
37        end
                    
39        def allow_local_requests?
                    
40          Gitlab::CurrentSettings.allow_local_requests_from_web_hooks_and_services?
                    
41        end
                    
                
oauth_provider.md https://gitlab.com/lavvy/artifacts-browser-demo | Markdown | 35 lines
                    
1## GitLab as OAuth2 authentication service provider
                    
2
                    
3This document is about using GitLab as an OAuth authentication service provider to sign into other services.
                    
4If you want to use other OAuth authentication service providers to sign into GitLab please see the [OAuth2 client documentation](../api/oauth2.md)
                    
5
                    
5
                    
6OAuth2 provides client applications a 'secure delegated access' to server resources on behalf of a resource owner. Or you can allow users to sign in to your application with their GitLab.com account.
                    
7In fact OAuth allows to issue access token to third-party clients by an authorization server, 
                    
8with the approval of the resource owner, or end-user. 
                    
9Mostly, OAuth2 is using for SSO (Single sign-on). But you can find a lot of different usages for this functionality. 
                    
10For example, our feature 'GitLab Importer' is using OAuth protocol to give an access to repositories without sharing user credentials to GitLab.com account. 
                    
10For example, our feature 'GitLab Importer' is using OAuth protocol to give an access to repositories without sharing user credentials to GitLab.com account. 
                    
11Also GitLab.com application can be used for authentication to your GitLab instance if needed [GitLab OmniAuth](gitlab.md).
                    
12
                    
12
                    
13GitLab has two ways to add new OAuth2 application to an instance, you can add application as regular user and through admin area. So GitLab actually can have an instance-wide and a user-wide applications. There is no defferences between them except the different permission levels.
                    
14
                    
                
default.rb https://gitlab.com/conrado/cookbook-gitlab.git | Ruby | 209 lines
                    
19# GitLab shell
                    
20default['gitlab']['shell_repository'] = "https://github.com/gitlabhq/gitlab-shell.git"
                    
21default['gitlab']['shell_revision'] = "v1.8.0"
                    
28default['gitlab']['redis_port'] = "6379"
                    
29default['gitlab']['namespace']  = "resque:gitlab"
                    
30default['gitlab']['self_signed_cert'] = false
                    
32# GitLab
                    
33default['gitlab']['repository'] = "https://github.com/gitlabhq/gitlabhq.git"
                    
34default['gitlab']['deploy_key'] = "" # Optional. Private key used to connect to private GitLab repository.
                    
61default['gitlab']['oauth_allow_single_sign_on'] = false
                    
62default['gitlab']['oauth_providers'] = [] # Example: default['gitlab']['oauth_providers'] = [ { "name": "google_oauth2", "app_id": "YOUR APP ID", "app_secret": "YOUR APP SECRET", "args": "access_type: 'offline', approval_prompt: ''" }, { "name": "twitter", "app_id": "YOUR APP ID", "app_secret": "YOUR APP SECRET" }, { "name":"github", "app_id": "YOUR APP ID", "app_secret": "YOUR APP SECRET" }]
                    
63
                    
153# GitLab hq
                    
154default['gitlab']['path'] = "/home/git/gitlab" # Do not change this attribute in production since some code from the GitLab repo such as init.d assume this path.
                    
155default['gitlab']['satellites_path'] = "/home/git/gitlab-satellites"
                    
                
auth.rb https://gitlab.com/nulldoxyz/gitlab-ce | Ruby | 255 lines
                    
31          user_with_password_for_git(login, password) ||
                    
32          Gitlab::Auth::Result.new
                    
33
                    
34        rate_limit!(ip, success: result.success?, login: login)
                    
35        Gitlab::Auth::UniqueIpsLimiter.limit_user!(result.actor)
                    
36
                    
102          # in the Service.available_services_names whitelist.
                    
103          service = project.public_send("#{underscored_service}_service") # rubocop:disable GitlabSecurity/PublicSend
                    
104
                    
114
                    
115        raise Gitlab::Auth::MissingPersonalAccessTokenError if user.two_factor_enabled?
                    
116
                    
116
                    
117        Gitlab::Auth::Result.new(user, nil, :gitlab_or_ldap, full_authentication_abilities)
                    
118      end
                    
                
doorkeeper.rb https://gitlab.com/strzibny/gitlab-ce | Ruby | 102 lines
                    
14  resource_owner_from_credentials do |routes|
                    
15    Gitlab::Auth.find_with_user_password(params[:username], params[:password])
                    
16  end
                    
39  # Forces the usage of the HTTPS protocol in non-native redirect uris (enabled
                    
40  # by default in non-development environments). OAuth2 delegates security in
                    
41  # communication to the HTTPS protocol so it is wise to keep this enabled.
                    
71  # The value can be any string. Use nil to disable this feature. When disabled, clients must provide a valid URL
                    
72  # (Similar behaviour: https://developers.google.com/accounts/docs/OAuth2InstalledApp#choosingredirecturi)
                    
73  #
                    
                
Gemfile https://gitlab.com/bbodenmiller/gitlab-ee.git | Gemfile | 278 lines
                    
40# Provide access to Gitlab::Git library
                    
41gem "gitlab_git", '~> 7.2.5'
                    
42
                    
43# Ruby/Rack Git Smart-HTTP Server Handler
                    
44# GitLab fork with a lot of changes (improved thread-safety, better memory usage etc)
                    
45# For full list of changes see https://github.com/SaitoWu/grack/compare/master...gitlabhq:master
                    
50# see https://github.com/intridea/omniauth-ldap/compare/master...gitlabhq:master
                    
51gem 'gitlab_omniauth-ldap', '1.2.1', require: "omniauth-ldap"
                    
52gem 'net-ldap'
                    
60# dependency to unstable rugged version. We have internal issue for replacing
                    
61# fork with original gem when we meet on same rugged version - https://dev.gitlab.org/gitlab/gitlabhq/issues/2052.
                    
62gem "gitlab-linguist", "~> 3.0.1", require: "linguist"
                    
271group :production do
                    
272  gem "gitlab_meta", '7.0'
                    
273end
                    
                
doorkeeper.rb https://gitlab.com/sandish/gitlab-ce | Ruby | 123 lines
                    
8  # Restore to pre-5.1 generator due to breaking change.
                    
9  # See https://gitlab.com/gitlab-org/gitlab/-/issues/244371
                    
10  default_generator_method :hex
                    
25  resource_owner_from_credentials do |routes|
                    
26    user = Gitlab::Auth.find_with_user_password(params[:username], params[:password], increment_failed_attempts: true)
                    
27    user unless user.try(:two_factor_enabled?)
                    
41  # Until 15.0, applications can opt-out of expiring tokens.
                    
42  # Removal issue: https://gitlab.com/gitlab-org/gitlab/-/issues/340848
                    
43  custom_access_token_expires_in do |context|
                    
59  # Forces the usage of the HTTPS protocol in non-native redirect uris (enabled
                    
60  # by default in non-development environments). OAuth2 delegates security in
                    
61  # communication to the HTTPS protocol so it is wise to keep this enabled.
                    
120  #
                    
121  # We might want to disable this in the future, see https://gitlab.com/gitlab-org/gitlab/-/issues/323615
                    
122  skip_client_authentication_for_password_grant true
                    
                
personal_access_tokens.md https://gitlab.com/sandish/gitlab-ce | Markdown | 198 lines
                    
9
                    
10> - Notifications for expiring tokens [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/3649) in GitLab 12.6.
                    
11> - Token lifetime limits [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/3649) in GitLab 12.6.
                    
11> - Token lifetime limits [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/3649) in GitLab 12.6.
                    
12> - Additional notifications for expiring tokens [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/214721) in GitLab 13.3.
                    
13> - Prefill for token name and scopes [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/334664) in GitLab 14.1.
                    
97| `read_user`        | Read-only for endpoints under `/users`. Essentially, access to any of the `GET` requests in the [Users API](../../api/users.md). |
                    
98| `read_api`         | Read-only for the complete API, including all groups and projects, the Container Registry, and the Package Registry. ([Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/28944) in GitLab 12.10.) |
                    
99| `read_repository`  | Read-only (pull) for the repository through `git clone`. |
                    
101| `read_registry`    | Read-only (pull) for [Container Registry](../packages/container_registry/index.md) images if a project is private and authorization is required. |
                    
102| `write_registry`   | Read-write (push) for [Container Registry](../packages/container_registry/index.md) images if a project is private and authorization is required. ([Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/28958) in GitLab 12.10.) |
                    
103| `sudo`             | API actions as any user in the system (if the authenticated user is an administrator). |
                    
137   The token must be 20 characters long. The scopes must be valid and are visible
                    
138   [in the source code](https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/auth.rb).
                    
139
                    
                
Gemfile https://gitlab.com/LukeT/gitlab-ce | Gemfile | 280 lines
                    
26gem 'omniauth', "~> 1.2.2"
                    
27gem 'omniauth-google-oauth2'
                    
28gem 'omniauth-twitter'
                    
31gem 'omniauth-kerberos', group: :kerberos
                    
32gem 'omniauth-gitlab'
                    
33gem 'omniauth-bitbucket'
                    
34gem 'doorkeeper', '2.1.3'
                    
35gem "rack-oauth2", "~> 1.0.5"
                    
36
                    
45# Extracting information from a git repository
                    
46# Provide access to Gitlab::Git library
                    
47gem "gitlab_git", '~> 7.1.13'
                    
49# Ruby/Rack Git Smart-HTTP Server Handler
                    
50gem 'gitlab-grack', '~> 2.0.2', require: 'grack'
                    
51
                    
                
Gemfile https://gitlab.com/lifuzu/gitlab-ce.git | Gemfile | 222 lines
                    
26gem 'omniauth', "~> 1.1.3"
                    
27gem 'omniauth-google-oauth2'
                    
28gem 'omniauth-twitter'
                    
31# Extracting information from a git repository
                    
32# Provide access to Gitlab::Git library
                    
33gem "gitlab_git", "~> 4.0.0"
                    
35# Ruby/Rack Git Smart-HTTP Server Handler
                    
36gem 'gitlab-grack', '~> 2.0.0.pre', require: 'grack'
                    
37
                    
38# LDAP Auth
                    
39gem 'gitlab_omniauth-ldap', '1.0.3', require: "omniauth-ldap"
                    
40
                    
41# Syntax highlighter
                    
42gem "gitlab-pygments.rb", '~> 0.5.4', require: 'pygments.rb'
                    
43
                    
                
README.md https://gitlab.com/micealgallagher/gitlab-ce | Markdown | 52 lines
                    
6- [CI](ci/README.md) GitLab Continuous Integration (CI) getting started, `.gitlab-ci.yml` options, and examples.
                    
7- [GitLab as OAuth2 authentication service provider](integration/oauth_provider.md). It allows you to login to other applications from GitLab.
                    
8- [GitLab Basics](gitlab-basics/README.md) Find step by step how to start working on your commandline and on GitLab.
                    
17- [Webhooks](web_hooks/web_hooks.md) Let GitLab notify you when new code has been pushed to your project.
                    
18- [Workflow](workflow/README.md) Using GitLab functionality and importing projects from GitHub and SVN.
                    
19
                    
25- [Install](install/README.md) Requirements, directory structures and installation from source.
                    
26- [Restart GitLab](administration/restart_gitlab.md) Learn how to restart GitLab and its components
                    
27- [Integration](integration/README.md) How to integrate with systems such as JIRA, Redmine, Twitter.
                    
39- [Reply by email](incoming_email/README.md) Allow users to comment on issues and merge requests by replying to notification emails.
                    
40- [Migrate GitLab CI to CE/EE](migrate_ci_to_ce/README.md) Follow this guide to migrate your existing GitLab CI data to GitLab CE/EE.
                    
41- [Git LFS configuration](workflow/lfs/lfs_administration.md)
                    
42- [Housekeeping](administration/housekeeping.md) Keep your Git repository tidy and fast.
                    
43- [GitLab Performance Monitoring](monitoring/performance/introduction.md) Configure GitLab and InfluxDB for measuring performance metrics
                    
44- [Sidekiq Troubleshooting](administration/troubleshooting/sidekiq.md) Debug when Sidekiq appears hung and is not processing jobs
                    
                
omniauth.md https://gitlab.com/hiroponz/gitlab-ce.git | Markdown | 272 lines
                    
12- [Enable OmniAuth for an Existing User](#enable-omniauth-for-an-existing-user)
                    
13- [OmniAuth configuration sample when using Omnibus GitLab](https://gitlab.com/gitlab-org/omnibus-gitlab/tree/master#omniauth-google-twitter-github-login)
                    
14- [Enable or disable Sign In with an OmniAuth provider without disabling import sources](#enable-or-disable-sign-in-with-an-omniauth-provider-without-disabling-import-sources)
                    
23- [Bitbucket](bitbucket.md)
                    
24- [GitLab.com](gitlab.md)
                    
25- [Google](google.md)
                    
160```ruby
                    
161  gitlab_rails['omniauth_external_providers'] = ['twitter', 'google_oauth2']
                    
162```
                    
189
                    
190-   Add the gem to your [Gemfile](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/Gemfile):
                    
191
                    
261```ruby
                    
262  gitlab_rails['sync_profile_from_provider'] = ['twitter', 'google_oauth2']
                    
263  gitlab_rails['sync_profile_attributes'] = ['name', 'email', 'location']
                    
                
doorkeeper.rb https://gitlab.com/fatslo/gitlab-ce | Ruby | 102 lines
                    
14  resource_owner_from_credentials do |routes|
                    
15    Gitlab::Auth.find_in_gitlab_or_ldap(params[:username], params[:password])
                    
16  end
                    
39  # Forces the usage of the HTTPS protocol in non-native redirect uris (enabled
                    
40  # by default in non-development environments). OAuth2 delegates security in
                    
41  # communication to the HTTPS protocol so it is wise to keep this enabled.
                    
71  # The value can be any string. Use nil to disable this feature. When disabled, clients must provide a valid URL
                    
72  # (Similar behaviour: https://developers.google.com/accounts/docs/OAuth2InstalledApp#choosingredirecturi)
                    
73  #
                    
                
README.md https://gitlab.com/jastkand/gitlab-ce | Markdown | 66 lines
                    
2
                    
3GitLab integrates with multiple third-party services to allow external issue
                    
4trackers and external authentication.
                    
10- [LDAP](ldap.md) Set up sign in via LDAP
                    
11- [OmniAuth](omniauth.md) Sign in via Twitter, GitHub, GitLab.com, Google, Bitbucket, Facebook, Shibboleth, SAML, Crowd, Azure and Authentiq ID
                    
12- [SAML](saml.md) Configure GitLab as a SAML 2.0 Service Provider
                    
13- [CAS](cas.md) Configure GitLab to sign in using CAS
                    
14- [OAuth2 provider](oauth_provider.md) OAuth2 application creation
                    
15- [Gmail actions buttons](gmail_action_buttons_for_gitlab.md) Adds GitLab actions to messages
                    
20
                    
21GitLab Enterprise Edition contains [advanced Jenkins support][jenkins].
                    
22
                    
22
                    
23[jenkins]: http://docs.gitlab.com/ee/integration/jenkins.html
                    
24
                    
                
omniauth.md https://gitlab.com/axil/gitlab | Markdown | 359 lines
                    
19- [Enable OmniAuth for an Existing User](#enable-omniauth-for-an-existing-user)
                    
20- [OmniAuth configuration sample when using Omnibus GitLab](https://gitlab.com/gitlab-org/omnibus-gitlab/tree/master#omniauth-google-twitter-github-login)
                    
21- [Enable or disable Sign In with an OmniAuth provider without disabling import sources](#enable-or-disable-sign-in-with-an-omniauth-provider-without-disabling-import-sources)
                    
151
                    
152> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/36664) in GitLab 13.4.
                    
153
                    
216
                    
217- Add the gem to your [`Gemfile`](https://gitlab.com/gitlab-org/gitlab/blob/master/Gemfile):
                    
218
                    
315```ruby
                    
316gitlab_rails['omniauth_allow_bypass_two_factor'] = ['twitter', 'google_oauth2']
                    
317```
                    
337```ruby
                    
338gitlab_rails['omniauth_auto_sign_in_with_provider'] = 'azure_oauth2'
                    
339```
                    
                
twitter.md https://gitlab.com/markglenfletcher/gitlab-ce | Markdown | 84 lines
                    
91. Fill in the application details.
                    
10   - Name: This can be anything. Consider something like `<Organization>'s GitLab` or `<Your Name>'s GitLab` or
                    
11   something else descriptive.
                    
12   - Description: Create a description.
                    
13   - Website: The URL to your GitLab installation. `https://gitlab.example.com`
                    
14   - Callback URL: `https://gitlab.example.com/users/auth/twitter/callback`
                    
37   ```sh
                    
38     sudo editor /etc/gitlab/gitlab.rb
                    
39   ```
                    
80
                    
81On the sign in page there should now be a Twitter icon below the regular sign in form. Click the icon to begin the authentication process. Twitter will ask the user to sign in and authorize the GitLab application. If everything goes well the user will be returned to GitLab and will be signed in.
                    
82
                    
83[reconfigure]: ../administration/restart_gitlab.md#omnibus-gitlab-reconfigure
                    
84[restart GitLab]: ../administration/restart_gitlab.md#installations-from-source
                    
85
                    
                
auth_helper.rb https://gitlab.com/jacobvosmaer-gitlab/gitlab-ce | Ruby | 80 lines
                    
1module AuthHelper
                    
2  PROVIDERS_WITH_ICONS = %w(twitter github gitlab bitbucket google_oauth2 facebook azure_oauth2 authentiq).freeze
                    
3  FORM_BASED_PROVIDERS = [/\Aldap/, 'crowd'].freeze
                    
5  def ldap_enabled?
                    
6    Gitlab::LDAP::Config.enabled?
                    
7  end
                    
9  def omniauth_enabled?
                    
10    Gitlab.config.omniauth.enabled
                    
11  end
                    
17  def auth_providers
                    
18    Gitlab::OAuth::Provider.providers
                    
19  end
                    
21  def label_for_provider(name)
                    
22    Gitlab::OAuth::Provider.label_for(name)
                    
23  end
                    
                
routes.rb https://gitlab.com/hutusi/gitlab-ci.git | Ruby | 87 lines
                    
8  resource :help do
                    
9    get :oauth2
                    
10  end
                    
14      post :add
                    
15      get :gitlab
                    
16    end
                    
                
twitter.md https://gitlab.com/demisxbar/gitlab-ce | Markdown | 79 lines
                    
1# Twitter OAuth2 OmniAuth Provider
                    
2
                    
91.  Fill in the application details.
                    
10    - Name: This can be anything. Consider something like "\<Organization\>'s GitLab" or "\<Your Name\>'s GitLab" or
                    
11    something else descriptive.
                    
12    - Description: Create a description.
                    
13    - Website: The URL to your GitLab installation. 'https://gitlab.example.com'
                    
14    - Callback URL: 'https://gitlab.example.com/users/auth/twitter/callback'
                    
31
                    
321.  On your GitLab server, open the configuration file.
                    
33
                    
36    ```sh
                    
37      sudo editor /etc/gitlab/gitlab.rb
                    
38    ```
                    
78
                    
79On the sign in page there should now be a Twitter icon below the regular sign in form. Click the icon to begin the authentication process. Twitter will ask the user to sign in and authorize the GitLab application. If everything goes well the user will be returned to GitLab and will be signed in.
                    
80
                    
                
grack_auth.rb https://gitlab.com/rdavila/eeclone | Ruby | 309 lines
                    
24      # Need this if under RELATIVE_URL_ROOT
                    
25      unless Gitlab.config.gitlab.relative_url_root.empty?
                    
26        # If website is mounted using relative_url_root need to remove it first
                    
26        # If website is mounted using relative_url_root need to remove it first
                    
27        @env['PATH_INFO'] = @request.path.sub(Gitlab.config.gitlab.relative_url_root,'')
                    
28      else
                    
142    def oauth_access_token_check(login, password)
                    
143      if login == "oauth2" && git_cmd == 'git-upload-pack' && password.present?
                    
144        token = Doorkeeper::AccessToken.by_token(password)
                    
197      when *Gitlab::GitAccess::DOWNLOAD_COMMANDS
                    
198        if !Gitlab.config.gitlab_shell.upload_pack
                    
199          false
                    
208      when *Gitlab::GitAccess::PUSH_COMMANDS
                    
209        if !Gitlab.config.gitlab_shell.receive_pack
                    
210          false
                    
                
README.md https://gitlab.com/takitak/gitlab-ee | Markdown | 63 lines
                    
1# GitLab Integration
                    
2
                    
2
                    
3GitLab integrates with multiple third-party services to allow external issue
                    
4trackers and external authentication.
                    
12- [OmniAuth](omniauth.md) Sign in via Twitter, GitHub, GitLab.com, Google, Bitbucket, Facebook, Shibboleth, SAML, Crowd and Azure
                    
13- [SAML](saml.md) Configure GitLab as a SAML 2.0 Service Provider
                    
14- [CAS](cas.md) Configure GitLab to sign in using CAS
                    
16- [Kerberos](kerberos.md) Integrate with Kerberos
                    
17- [OAuth2 provider](oauth_provider.md) OAuth2 application creation
                    
18- [Gmail actions buttons](gmail_action_buttons_for_gitlab.md) Adds GitLab actions to messages
                    
18- [Gmail actions buttons](gmail_action_buttons_for_gitlab.md) Adds GitLab actions to messages
                    
19- [reCAPTCHA](recaptcha.md) Configure GitLab to use Google reCAPTCHA for new users
                    
20- [Akismet](akismet.md) Configure Akismet to stop spam
                    
21
                    
22GitLab Enterprise Edition contains [advanced Jenkins support][jenkins].
                    
23
                    
                
icons_helper.rb https://gitlab.com/markglenfletcher/gitlab-ce | Ruby | 163 lines
                    
32    # we have to set the current path deliberately to prevent addition of asset_host
                    
33    sprite_base_url = Gitlab.config.gitlab.url if ActionController::Base.asset_host
                    
34    ActionController::Base.helpers.image_path('icons.svg', host: sprite_base_url)
                    
39    # we have to set the current path deliberately to prevent addition of asset_host
                    
40    sprite_base_url = Gitlab.config.gitlab.url if ActionController::Base.asset_host
                    
41    ActionController::Base.helpers.image_path('file_icons.svg', host: sprite_base_url)
                    
44  def sprite_icon(icon_name, size: nil, css_class: nil)
                    
45    if Gitlab::Sentry.should_raise_for_dev?
                    
46      unless known_sprites.include?(icon_name)
                    
46      unless known_sprites.include?(icon_name)
                    
47        exception = ArgumentError.new("#{icon_name} is not a known icon in @gitlab-org/gitlab-svg")
                    
48        raise exception
                    
67      names = "key"
                    
68    when "google_oauth2"
                    
69      names = "google"
                    
                
provider.rb https://gitlab.com/pauldibiase/gitlab-ce | Ruby | 38 lines
                    
1module Gitlab
                    
2  module OAuth
                    
5        "github"         => "GitHub",
                    
6        "gitlab"         => "GitLab.com",
                    
7        "google_oauth2"  => "Google"
                    
24        if ldap_provider?(name)
                    
25          Gitlab::LDAP::Config.new(name).options
                    
26        else
                    
26        else
                    
27          Gitlab.config.omniauth.providers.find { |provider| provider.name == name }
                    
28        end
                    
                
project_creator.rb https://gitlab.com/nja94/gitlab-ce | Ruby | 30 lines
                    
1module Gitlab
                    
2  module GitlabImport
                    
20          visibility_level: repo["visibility_level"],
                    
21          import_type: "gitlab",
                    
22          import_source: repo["path_with_namespace"],
                    
22          import_source: repo["path_with_namespace"],
                    
23          import_url: repo["http_url_to_repo"].sub("://", "://oauth2:#{@session_data[:gitlab_access_token]}@")
                    
24        ).execute
                    
                
client.rb https://gitlab.com/pauldibiase/gitlab-ce | Ruby | 82 lines
                    
1module Gitlab
                    
2  module GitlabImport
                    
8      def initialize(access_token)
                    
9        @client = ::OAuth2::Client.new(
                    
10          config.app_id,
                    
11          config.app_secret,
                    
12          gitlab_options
                    
13        )
                    
15        if access_token
                    
16          @api = OAuth2::AccessToken.from_hash(@client, access_token: access_token)
                    
17        end
                    
73      def config
                    
74        Gitlab.config.omniauth.providers.find{|provider| provider.name == "gitlab"}
                    
75      end
                    
76
                    
77      def gitlab_options
                    
78        OmniAuth::Strategies::GitLab.default_options[:client_options].to_h.symbolize_keys
                    
                
Gemfile https://gitlab.com/Matthieu_Perrot/gitlab-ce | Gemfile | 325 lines
                    
9# Specify a sprockets version due to increased performance
                    
10# See https://gitlab.com/gitlab-org/gitlab-ce/issues/6069
                    
11gem 'sprockets', '~> 3.3.5'
                    
24gem 'omniauth',               '~> 1.3.1'
                    
25gem 'omniauth-azure-oauth2',  '~> 0.0.6'
                    
26gem 'omniauth-bitbucket',     '~> 0.0.2'
                    
29gem 'omniauth-github',        '~> 1.1.1'
                    
30gem 'omniauth-gitlab',        '~> 1.0.0'
                    
31gem 'omniauth-google-oauth2', '~> 0.2.0'
                    
36gem 'omniauth_crowd',         '~> 2.2.0'
                    
37gem 'rack-oauth2',            '~> 1.2.1'
                    
38
                    
51# Extracting information from a git repository
                    
52# Provide access to Gitlab::Git library
                    
53gem "gitlab_git", '~> 9.0'
                    
                
Gemfile https://gitlab.com/strzibny/gitlab-ce | Gemfile | 351 lines
                    
9# Specify a sprockets version due to increased performance
                    
10# See https://gitlab.com/gitlab-org/gitlab-ce/issues/6069
                    
11gem 'sprockets', '~> 3.6.0'
                    
24gem 'omniauth-auth0',         '~> 1.4.1'
                    
25gem 'omniauth-azure-oauth2',  '~> 0.0.6'
                    
26gem 'omniauth-bitbucket',     '~> 0.0.2'
                    
29gem 'omniauth-github',        '~> 1.1.1'
                    
30gem 'omniauth-gitlab',        '~> 1.0.0'
                    
31gem 'omniauth-google-oauth2', '~> 0.2.0'
                    
36gem 'omniauth_crowd',         '~> 2.2.0'
                    
37gem 'rack-oauth2',            '~> 1.2.1'
                    
38gem 'jwt'
                    
53# Extracting information from a git repository
                    
54# Provide access to Gitlab::Git library
                    
55gem "gitlab_git", '~> 10.2'
                    
                
index.md https://gitlab.com/haynes/gitlab-ee.git | Markdown | 49 lines
                    
10- **Articles:**
                    
11  - [Support for Universal 2nd Factor Authentication - YubiKeys](https://about.gitlab.com/2016/06/22/gitlab-adds-support-for-u2f/)
                    
12  - [Security Webcast with Yubico](https://about.gitlab.com/2016/08/31/gitlab-and-yubico-security-webcast/)
                    
22- **Articles:**
                    
23  - [How to Configure LDAP with GitLab CE](../../administration/auth/how_to_configure_ldap_gitlab_ce/index.md)
                    
24  - [How to Configure LDAP with GitLab EE](../../administration/auth/how_to_configure_ldap_gitlab_ee/index.md)
                    
40- [Impersonation tokens](../../api/README.md#impersonation-tokens)
                    
41- [GitLab as an OAuth2 provider](../../api/oauth2.md#gitlab-as-an-oauth2-provider)
                    
42
                    
44
                    
45- [Kanboard Plugin GitLab Authentication](https://kanboard.net/plugin/gitlab-auth)
                    
46- [Jenkins GitLab OAuth Plugin](https://wiki.jenkins-ci.org/display/JENKINS/GitLab+OAuth+Plugin)
                    
47- [Setup Gitlab CE with Active Directory authentication](https://www.caseylabs.com/setup-gitlab-ce-with-active-directory-authentication/)
                    
48- [How to customize GitLab to support OpenID authentication](http://eric.van-der-vlist.com/blog/2013/11/23/how-to-customize-gitlab-to-support-openid-authentication/)
                    
49- [Openshift - Configuring Authentication and User Agent](https://docs.openshift.org/latest/install_config/configuring_authentication.html#GitLab)
                    
                
README.md https://gitlab.com/arankoning/gitlab-ce | Markdown | 54 lines
                    
6- [CI](ci/README.md) GitLab Continuous Integration (CI) getting started, `.gitlab-ci.yml` options, and examples.
                    
7- [GitLab as OAuth2 authentication service provider](integration/oauth_provider.md). It allows you to login to other applications from GitLab.
                    
8- [GitLab Basics](gitlab-basics/README.md) Find step by step how to start working on your commandline and on GitLab.
                    
17- [Webhooks](web_hooks/web_hooks.md) Let GitLab notify you when new code has been pushed to your project.
                    
18- [Workflow](workflow/README.md) Using GitLab functionality and importing projects from GitHub and SVN.
                    
19
                    
25- [Install](install/README.md) Requirements, directory structures and installation from source.
                    
26- [Restart GitLab](administration/restart_gitlab.md) Learn how to restart GitLab and its components
                    
27- [Integration](integration/README.md) How to integrate with systems such as JIRA, Redmine, Twitter.
                    
39- [Reply by email](incoming_email/README.md) Allow users to comment on issues and merge requests by replying to notification emails.
                    
40- [Migrate GitLab CI to CE/EE](migrate_ci_to_ce/README.md) Follow this guide to migrate your existing GitLab CI data to GitLab CE/EE.
                    
41- [Git LFS configuration](workflow/lfs/lfs_administration.md)
                    
42- [Housekeeping](administration/housekeeping.md) Keep your Git repository tidy and fast.
                    
43- [GitLab Performance Monitoring](monitoring/performance/introduction.md) Configure GitLab and InfluxDB for measuring performance metrics
                    
44- [Monitoring uptime](monitoring/health_check.md) Check the server status using the health check endpoint
                    
                
Gemfile https://gitlab.com/fzipi/gitlab-ce.git | Gemfile | 275 lines
                    
40# Provide access to Gitlab::Git library
                    
41gem "gitlab_git", '~> 7.2.12'
                    
42
                    
43# Ruby/Rack Git Smart-HTTP Server Handler
                    
44# GitLab fork with a lot of changes (improved thread-safety, better memory usage etc)
                    
45# For full list of changes see https://github.com/SaitoWu/grack/compare/master...gitlabhq:master
                    
50# see https://github.com/intridea/omniauth-ldap/compare/master...gitlabhq:master
                    
51gem 'gitlab_omniauth-ldap', '1.2.1', require: "omniauth-ldap"
                    
52
                    
56# Language detection
                    
57# GitLab fork of linguist does not require pygments/python dependency.
                    
58# New version of original gem also dropped pygments support but it has strict
                    
59# dependency to unstable rugged version. We have internal issue for replacing
                    
60# fork with original gem when we meet on same rugged version - https://dev.gitlab.org/gitlab/gitlabhq/issues/2052.
                    
61gem "gitlab-linguist", "~> 3.0.1", require: "linguist"
                    
                
client.rb https://gitlab.com/sandish/gitlab-ce | Ruby | 224 lines
                    
24      ROLES_LIST = %w[roles/iam.serviceAccountUser roles/artifactregistry.admin roles/cloudbuild.builds.builder roles/run.admin roles/storage.admin roles/cloudsql.admin roles/browser].freeze
                    
25      REVOKE_URL = 'https://oauth2.googleapis.com/revoke'
                    
26
                    
113        # generate account id
                    
114        random_account_id = "gitlab-" + SecureRandom.hex(11)
                    
115
                    
151        uri = URI(REVOKE_URL)
                    
152        Gitlab::HTTP.post(uri, body: { 'token' => access_token })
                    
153      end
                    
201        Google::Apis::RequestOptions.new.tap do |options|
                    
202          options.header = { 'User-Agent': "GitLab/#{Gitlab::VERSION.match('(\d+\.\d+)').captures.first} (GPN:GitLab;)" }
                    
203        end
                    
                
grack_auth.rb https://gitlab.com/oscar-lopez/gitlab-ee | Ruby | 257 lines
                    
27      # Need this if under RELATIVE_URL_ROOT
                    
28      unless Gitlab.config.gitlab.relative_url_root.empty?
                    
29        # If website is mounted using relative_url_root need to remove it first
                    
29        # If website is mounted using relative_url_root need to remove it first
                    
30        @env['PATH_INFO'] = @request.path.sub(Gitlab.config.gitlab.relative_url_root,'')
                    
31      else
                    
38
                    
39      lfs_response = Gitlab::Lfs::Router.new(project, @user, @request).try_call
                    
40      return lfs_response unless lfs_response.nil?
                    
51    def allow_basic_auth?
                    
52      return true unless Gitlab.config.kerberos.enabled &&
                    
53                         Gitlab.config.kerberos.use_dedicated_port &&
                    
53                         Gitlab.config.kerberos.use_dedicated_port &&
                    
54                         @env['SERVER_PORT'] == Gitlab.config.kerberos.port.to_s
                    
55    end
                    
                
facebook.md https://gitlab.com/demisxbar/gitlab-ce | Markdown | 97 lines
                    
1# Facebook OAuth2 OmniAuth Provider
                    
2
                    
10
                    
111. Enter a name for your app. This can be anything. Consider something like "&lt;Organization&gt;'s GitLab" or "&lt;Your Name&gt;'s GitLab" or
                    
12something else descriptive.
                    
19
                    
201. Enter the address of your GitLab installation at the bottom of the package
                    
21
                    
49
                    
501.  On your GitLab server, open the configuration file.
                    
51
                    
54    ```sh
                    
55    sudo editor /etc/gitlab/gitlab.rb
                    
56    ```
                    
96
                    
97On the sign in page there should now be a Facebook icon below the regular sign in form. Click the icon to begin the authentication process. Facebook will ask the user to sign in and authorize the GitLab application. If everything goes well the user will be returned to GitLab and will be signed in.
                    
98
                    
                
azure.md https://gitlab.com/demisxbar/gitlab-ce | Markdown | 83 lines
                    
171.  On the "App properties" page enter the needed URI's and click the "Complete" button.
                    
18    - SIGN-IN URL: Enter the URL of your GitLab installation (e.g 'https://gitlab.mycompany.com/')
                    
19    - APP ID URI: Enter the endpoint URL for Microsoft to use, just has to be unique (e.g 'https://mycompany.onmicrosoft.com/gitlab')
                    
22
                    
231. Add a "Reply URL" pointing to the Azure OAuth callback of your GitLab installation (e.g. https://gitlab.mycompany.com/users/auth/azure_oauth2/callback).
                    
24
                    
37    ```sh
                    
38      sudo editor /etc/gitlab/gitlab.rb
                    
39    ```
                    
43    ```sh
                    
44      cd /home/git/gitlab
                    
45
                    
82
                    
83On the sign in page there should now be a Microsoft icon below the regular sign in form. Click the icon to begin the authentication process. Microsoft will ask the user to sign in and authorize the GitLab application. If everything goes well the user will be returned to GitLab and will be signed in.
                    
84
                    
                
release-notes.html https://gitlab.com/hotovo/mule-connectors | HTML | 219 lines
                    
23          <p>Release Notes for version V1.0.1 of the JIRA Rest Connector. These Release
                    
24            Notes accompany the <a href="https://hotovo.gitlab.io/mule-connectors/mule4-jira-rest-connector/docs/jira-rest-connector-reference.html">Technical Reference</a>            guide.</p>
                    
25        </div>
                    
86              <li>
                    
87                <p>When using OAuth2 authentication with older Mule runtime than <strong>4.2.2</strong>,
                    
88                  connector is unable to reconnect after the access token expires.</p>
                    
97              <li>
                    
98                <p>JIRA Rest Connector example can be found at <a href="https://gitlab.com/hotovo/mule-connectors/tree/master/mule4-jira-rest-connector/jira-crud-demo">CRUD demo application</a>.
                    
99                  Demo explaining OAuth authentication process
                    
99                  Demo explaining OAuth authentication process
                    
100                  <a href="https://gitlab.com/hotovo/mule-connectors/tree/master/mule4-jira-rest-connector/jira-oauth-demo">OAuth demo application</a>.</p>
                    
101              </li>
                    
123          <p>Release Notes for version V1.0.0 of the JIRA Rest Connector. These Release
                    
124            Notes accompany the <a href="https://hotovo.gitlab.io/mule-connectors/mule4-jira-rest-connector/docs/jira-rest-connector-reference.html">Technical Reference</a>            guide.</p>
                    
125        </div>
                    
                
Gemfile https://gitlab.com/gervasio/gitlab-ce.git | Gemfile | 224 lines
                    
25gem 'omniauth', "~> 1.1.3"
                    
26gem 'omniauth-google-oauth2'
                    
27gem 'omniauth-twitter'
                    
30# Extracting information from a git repository
                    
31# Provide access to Gitlab::Git library
                    
32gem "gitlab_git", '~> 5.3.0'
                    
34# Ruby/Rack Git Smart-HTTP Server Handler
                    
35gem 'gitlab-grack', '~> 2.0.0.pre', require: 'grack'
                    
36
                    
37# LDAP Auth
                    
38gem 'gitlab_omniauth-ldap', '1.0.4', require: "omniauth-ldap"
                    
39
                    
40# Git Wiki
                    
41gem "gitlab-gollum-lib", "~> 1.1.0", require: 'gollum-lib'
                    
42
                    
                
README.md https://gitlab.com/tbalthazar/gitlab-ce | Markdown | 61 lines
                    
7- [CI/CD](ci/README.md) GitLab Continuous Integration (CI) and Continuous Delivery (CD) getting started, `.gitlab-ci.yml` options, and examples.
                    
8- [GitLab as OAuth2 authentication service provider](integration/oauth_provider.md). It allows you to login to other applications from GitLab.
                    
9- [Container Registry](user/project/container_registry.md) Learn how to use GitLab Container Registry.
                    
9- [Container Registry](user/project/container_registry.md) Learn how to use GitLab Container Registry.
                    
10- [GitLab basics](gitlab-basics/README.md) Find step by step how to start working on your commandline and on GitLab.
                    
11- [Importing to GitLab](workflow/importing/README.md).
                    
30- [Install](install/README.md) Requirements, directory structures and installation from source.
                    
31- [Restart GitLab](administration/restart_gitlab.md) Learn how to restart GitLab and its components.
                    
32- [Integration](integration/README.md) How to integrate with systems such as JIRA, Redmine, Twitter.
                    
46- [Reply by email](administration/reply_by_email.md) Allow users to comment on issues and merge requests by replying to notification emails.
                    
47- [Migrate GitLab CI to CE/EE](migrate_ci_to_ce/README.md) Follow this guide to migrate your existing GitLab CI data to GitLab CE/EE.
                    
48- [Git LFS configuration](workflow/lfs/lfs_administration.md)
                    
49- [Housekeeping](administration/housekeeping.md) Keep your Git repository tidy and fast.
                    
50- [GitLab Performance Monitoring](administration/monitoring/performance/introduction.md) Configure GitLab and InfluxDB for measuring performance metrics.
                    
51- [Monitoring uptime](user/admin_area/monitoring/health_check.md) Check the server status using the health check endpoint.
                    
                
auth.go https://gitlab.com/willjharmer/kanban | Go | 129 lines
                    
4	"fmt"
                    
5	"gitlab.com/leanlabsio/kanban/models"
                    
6	"gitlab.com/leanlabsio/kanban/modules/auth"
                    
6	"gitlab.com/leanlabsio/kanban/modules/auth"
                    
7	"gitlab.com/leanlabsio/kanban/modules/middleware"
                    
8	"gopkg.in/macaron.v1"
                    
17
                    
18// OauthLogin logins with gitlab and get access token
                    
19func OauthLogin(ctx *middleware.Context, form auth.Oauth2) {
                    
                
Gemfile https://gitlab.com/FeyP/gitlab-ce.git | Gemfile | 280 lines
                    
26gem 'omniauth', "~> 1.2.2"
                    
27gem 'omniauth-google-oauth2'
                    
28gem 'omniauth-twitter'
                    
31gem 'omniauth-kerberos', group: :kerberos
                    
32gem 'omniauth-gitlab'
                    
33gem 'omniauth-bitbucket'
                    
34gem 'doorkeeper', '2.1.3'
                    
35gem "rack-oauth2", "~> 1.0.5"
                    
36
                    
45# Extracting information from a git repository
                    
46# Provide access to Gitlab::Git library
                    
47gem "gitlab_git", '~> 7.1.12'
                    
49# Ruby/Rack Git Smart-HTTP Server Handler
                    
50gem 'gitlab-grack', '~> 2.0.2', require: 'grack'
                    
51
                    
                
Gemfile https://gitlab.com/benmezger/gitlab-ce | Gemfile | 267 lines
                    
26gem 'omniauth', "~> 1.1.3"
                    
27gem 'omniauth-google-oauth2'
                    
28gem 'omniauth-twitter'
                    
32gem 'doorkeeper', '2.1.0'
                    
33gem "rack-oauth2", "~> 1.0.5"
                    
34
                    
38# Extracting information from a git repository
                    
39# Provide access to Gitlab::Git library
                    
40gem "gitlab_git", '7.0.0.rc14'
                    
42# Ruby/Rack Git Smart-HTTP Server Handler
                    
43gem 'gitlab-grack', '~> 2.0.0.pre', require: 'grack'
                    
44
                    
45# LDAP Auth
                    
46gem 'gitlab_omniauth-ldap', '1.2.0', require: "omniauth-ldap"
                    
47
                    
                
Gemfile https://gitlab.com/featured/sky-support.git | Gemfile | 272 lines
                    
36# Provide access to Gitlab::Git library
                    
37gem "gitlab_git", '~> 7.2.5'
                    
38
                    
39# Ruby/Rack Git Smart-HTTP Server Handler
                    
40# GitLab fork with a lot of changes (improved thread-safety, better memory usage etc)
                    
41# For full list of changes see https://github.com/SaitoWu/grack/compare/master...gitlabhq:master
                    
46# see https://github.com/intridea/omniauth-ldap/compare/master...gitlabhq:master
                    
47gem 'gitlab_omniauth-ldap', '1.2.1', require: "omniauth-ldap"
                    
48
                    
52# Language detection
                    
53# GitLab fork of linguist does not require pygments/python dependency. 
                    
54# New version of original gem also dropped pygments support but it has strict 
                    
55# dependency to unstable rugged version. We have internal issue for replacing 
                    
56# fork with original gem when we meet on same rugged version - https://dev.gitlab.org/gitlab/gitlabhq/issues/2052.
                    
57gem "gitlab-linguist", "~> 3.0.1", require: "linguist"
                    
                
bitbucket.md https://gitlab.com/shellyvention/gitlab-ce | Markdown | 138 lines
                    
45    | **Application description** | Fill this in if you wish. |
                    
46    | **Callback URL** | The URL to your GitLab installation, e.g., `https://gitlab.example.com`. |
                    
47    | **URL** | The URL to your GitLab installation, e.g., `https://gitlab.example.com`. |
                    
75    # For Omnibus packages
                    
76    sudo editor /etc/gitlab/gitlab.rb
                    
77
                    
78    # For installations from source
                    
79    sudo -u git -H editor /home/git/gitlab/config/gitlab.yml
                    
80    ```
                    
134[bb-import]: ../workflow/importing/import_projects_from_bitbucket.md
                    
135[bb-old]: https://gitlab.com/gitlab-org/gitlab-ce/blob/8-14-stable/doc/integration/bitbucket.md
                    
136[bitbucket-docs]: https://confluence.atlassian.com/bitbucket/use-the-ssh-protocol-with-bitbucket-cloud-221449711.html#UsetheSSHprotocolwithBitbucketCloud-KnownhostorBitbucket%27spublickeyfingerprints
                    
136[bitbucket-docs]: https://confluence.atlassian.com/bitbucket/use-the-ssh-protocol-with-bitbucket-cloud-221449711.html#UsetheSSHprotocolwithBitbucketCloud-KnownhostorBitbucket%27spublickeyfingerprints
                    
137[reconfigure GitLab]: ../administration/restart_gitlab.md#omnibus-gitlab-reconfigure
                    
138[restart]: ../administration/restart_gitlab.md#installations-from-source
                    
                
github_controller.rb https://gitlab.com/axil/gitlab | Ruby | 268 lines
                    
17  rescue_from Octokit::TooManyRequests, with: :provider_rate_limit
                    
18  rescue_from Gitlab::GithubImport::RateLimitError, with: :rate_limit_threshold_exceeded
                    
19
                    
41    # Request repos to display error page if provider token is invalid
                    
42    # Improving in https://gitlab.com/gitlab-org/gitlab-foss/issues/55585
                    
43    client_repos
                    
104  def expire_etag_cache
                    
105    Gitlab::EtagCaching::Store.new.tap do |store|
                    
106      store.touch(realtime_changes_path)
                    
111    @client ||= if Feature.enabled?(:remove_legacy_github_client)
                    
112                  Gitlab::GithubImport::Client.new(session[access_token_key])
                    
113                else
                    
138
                    
139    @oauth_client ||= ::OAuth2::Client.new(
                    
140      oauth_config.app_id,
                    
                
auth_helper_spec.rb https://gitlab.com/nulldoxyz/gitlab-ce | Ruby | 79 lines
                    
72
                    
73    [:twitter, :facebook, :google_oauth2, :gitlab, :github, :bitbucket, :crowd, :auth0, :authentiq].each do |provider|
                    
74      it "returns false if the provider is #{provider}" do
                    
                
README.md https://gitlab.com/skahlhoefer/gitlab-ce | Markdown | 71 lines
                    
5- [API](api/README.md) Automate GitLab via a simple and powerful API.
                    
6- [GitLab as OAuth2 authentication service provider](integration/oauth_provider.md). It allows you to login to other applications from GitLab.
                    
7- [GitLab Basics](gitlab-basics/README.md) Find step by step how to start working on your commandline and on GitLab.
                    
7- [GitLab Basics](gitlab-basics/README.md) Find step by step how to start working on your commandline and on GitLab.
                    
8- [Importing to GitLab](workflow/importing/README.md).
                    
9- [Markdown](markdown/markdown.md) GitLab's advanced formatting system.
                    
14- [SSH](ssh/README.md) Setup your ssh keys and deploy keys for secure access to your projects.
                    
15- [Web hooks](web_hooks/web_hooks.md) Let GitLab notify you when new code has been pushed to your project.
                    
16- [Workflow](workflow/README.md) Using GitLab functionality and importing projects from GitHub and SVN.
                    
20- [Quick Start](ci/quick_start/README.md)
                    
21- [Configuring project (.gitlab-ci.yml)](ci/yaml/README.md)
                    
22- [Configuring runner](ci/runners/README.md)
                    
63- [Reply by email](incoming_email/README.md) Allow users to comment on issues and merge requests by replying to notification emails.
                    
64- [Migrate GitLab CI to CE/EE](migrate_ci_to_ce/README.md) Follow this guide to migrate your existing GitLab CI data to GitLab CE/EE.
                    
65- [Git LFS configuration](workflow/lfs/lfs_administration.md)
                    
                
index.md https://gitlab.com/alexcern/gitlab-ce | Markdown | 48 lines
                    
12- **Integrations:**
                    
13  - [GitLab as OAuth2 authentication service provider](../../integration/oauth_provider.md#introduction-to-oauth)
                    
14  - [GitLab as OpenID Connect identity provider](../../integration/openid_connect_provider.md)
                    
22  - [How to Configure LDAP with GitLab CE](../../articles/how_to_configure_ldap_gitlab_ce/index.md)
                    
23  - [How to Configure LDAP with GitLab EE](https://docs.gitlab.com/ee/articles/how_to_configure_ldap_gitlab_ee/)
                    
24  - [Feature Highlight: LDAP Integration](https://about.gitlab.com/2014/07/10/feature-highlight-ldap-sync/)
                    
32  - [Okta SSO provider](../../administration/auth/okta.md)
                    
33  - [Kerberos integration (GitLab EE)](https://docs.gitlab.com/ee/integration/kerberos.html)
                    
34
                    
39- [Impersonation tokens](../../api/README.md#impersonation-tokens)
                    
40- [GitLab as an OAuth2 provider](../../api/oauth2.md#gitlab-as-an-oauth2-provider)
                    
41
                    
46- [Setup Gitlab CE with Active Directory authentication](https://www.caseylabs.com/setup-gitlab-ce-with-active-directory-authentication/)
                    
47- [How to customize GitLab to support OpenID authentication](http://eric.van-der-vlist.com/blog/2013/11/23/how-to-customize-gitlab-to-support-openid-authentication/)
                    
48- [Openshift - Configuring Authentication and User Agent](https://docs.openshift.org/latest/install_config/configuring_authentication.html#GitLab)
                    
                
client.rb https://gitlab.com/bdrung/gitlab-ce | Ruby | 82 lines
                    
1module Gitlab
                    
2  module GitlabImport
                    
8      def initialize(access_token)
                    
9        @client = ::OAuth2::Client.new(
                    
10          config.app_id,
                    
11          config.app_secret,
                    
12          gitlab_options
                    
13        )
                    
15        if access_token
                    
16          @api = OAuth2::AccessToken.from_hash(@client, access_token: access_token)
                    
17        end
                    
73      def config
                    
74        Gitlab.config.omniauth.providers.find {|provider| provider.name == "gitlab"}
                    
75      end
                    
76
                    
77      def gitlab_options
                    
78        OmniAuth::Strategies::GitLab.default_options[:client_options].to_h.symbolize_keys
                    
                
index.md https://gitlab.com/jlogandavison/gitlab-ce | Markdown | 48 lines
                    
10  - [Support for Universal 2nd Factor Authentication - YubiKeys](https://about.gitlab.com/2016/06/22/gitlab-adds-support-for-u2f/)
                    
11  - [Security Webcast with Yubico](https://about.gitlab.com/2016/08/31/gitlab-and-yubico-security-webcast/)
                    
12- **Integrations:**
                    
21  - [How to Configure LDAP with GitLab CE](../../articles/how_to_configure_ldap_gitlab_ce/index.md)
                    
22  - [How to Configure LDAP with GitLab EE](https://docs.gitlab.com/ee/articles/how_to_configure_ldap_gitlab_ee/)
                    
23  - [Feature Highlight: LDAP Integration](https://about.gitlab.com/2014/07/10/feature-highlight-ldap-sync/)
                    
38- [Impersonation tokens](../../api/README.md#impersonation-tokens)
                    
39- [GitLab as an OAuth2 provider](../../api/oauth2.md#gitlab-as-an-oauth2-provider)
                    
40- [GitLab Runner API - Authentication](../../api/ci/runners.md#authentication)
                    
43
                    
44- [Kanboard Plugin GitLab Authentication](https://kanboard.net/plugin/gitlab-auth)
                    
45- [Jenkins GitLab OAuth Plugin](https://wiki.jenkins-ci.org/display/JENKINS/GitLab+OAuth+Plugin)
                    
46- [Setup Gitlab CE with Active Directory authentication](https://www.caseylabs.com/setup-gitlab-ce-with-active-directory-authentication/)
                    
47- [How to customize GitLab to support OpenID authentication](http://eric.van-der-vlist.com/blog/2013/11/23/how-to-customize-gitlab-to-support-openid-authentication/)
                    
48- [Openshift - Configuring Authentication and User Agent](https://docs.openshift.org/latest/install_config/configuring_authentication.html#GitLab)
                    
                
Gemfile https://gitlab.com/jk/gitlab-ce.git | Gemfile | 281 lines
                    
26gem 'omniauth', "~> 1.1.3"
                    
27gem 'omniauth-google-oauth2'
                    
28gem 'omniauth-twitter'
                    
31gem 'omniauth-kerberos', group: :kerberos
                    
32gem 'omniauth-gitlab'
                    
33gem 'omniauth-bitbucket'
                    
34gem 'doorkeeper', '2.1.3'
                    
35gem "rack-oauth2", "~> 1.0.5"
                    
36
                    
45# Extracting information from a git repository
                    
46# Provide access to Gitlab::Git library
                    
47gem "gitlab_git", '~> 7.1.11'
                    
49# Ruby/Rack Git Smart-HTTP Server Handler
                    
50gem 'gitlab-grack', '~> 2.0.2', require: 'grack'
                    
51
                    
                
admin_settings_spec.rb https://gitlab.com/dnoe/gitlab-ce.git | Ruby | 284 lines
                    
83
                    
84    expect(Gitlab::CurrentSettings.home_page_url).to eq "https://about.gitlab.com/"
                    
85    expect(page).to have_content "Application settings saved successfully"
                    
96    expect(page).to have_content "Application settings saved successfully"
                    
97    expect(Gitlab::CurrentSettings.disabled_oauth_sign_in_sources).to include('google_oauth2')
                    
98
                    
104    expect(page).to have_content "Application settings saved successfully"
                    
105    expect(Gitlab::CurrentSettings.disabled_oauth_sign_in_sources).not_to include('google_oauth2')
                    
106  end
                    
116    expect(Gitlab::CurrentSettings.help_page_text).to eq "Example text"
                    
117    expect(Gitlab::CurrentSettings.help_page_hide_commercial_content).to be_truthy
                    
118    expect(Gitlab::CurrentSettings.help_page_support_url).to eq "http://example.com/help"
                    
128
                    
129    expect(Gitlab::CurrentSettings.max_pages_size).to eq 15
                    
130    expect(Gitlab::CurrentSettings.pages_domain_verification_enabled?).to be_truthy
                    
                
api_guard.rb https://gitlab.com/siemens/gitlab-ce | Ruby | 173 lines
                    
58        if Feature.enabled?(:user_mode_in_session)
                    
59          current_user_mode = Gitlab::Auth::CurrentUserMode.new(user)
                    
60
                    
92      def api_access_allowed?(user)
                    
93        Gitlab::UserAccess.new(user).allowed? && user.can?(:access_api)
                    
94      end
                    
111
                    
112        base.__send__(:rescue_from, *error_classes, oauth2_bearer_token_error_handler) # rubocop:disable GitlabSecurity/PublicSend
                    
113      end
                    
114
                    
115      def oauth2_bearer_token_error_handler
                    
116        proc do |e|
                    
118            case e
                    
119            when Gitlab::Auth::MissingTokenError
                    
120              Rack::OAuth2::Server::Resource::Bearer::Unauthorized.new
                    
                
Gemfile https://gitlab.com/bb-froggy/gitlab-ce | Gemfile | 325 lines
                    
9# Specify a sprockets version due to increased performance
                    
10# See https://gitlab.com/gitlab-org/gitlab-ce/issues/6069
                    
11gem 'sprockets', '~> 3.3.5'
                    
24gem 'omniauth',               '~> 1.3.1'
                    
25gem 'omniauth-azure-oauth2',  '~> 0.0.6'
                    
26gem 'omniauth-bitbucket',     '~> 0.0.2'
                    
29gem 'omniauth-github',        '~> 1.1.1'
                    
30gem 'omniauth-gitlab',        '~> 1.0.0'
                    
31gem 'omniauth-google-oauth2', '~> 0.2.0'
                    
36gem 'omniauth_crowd',         '~> 2.2.0'
                    
37gem 'rack-oauth2',            '~> 1.2.1'
                    
38
                    
51# Extracting information from a git repository
                    
52# Provide access to Gitlab::Git library
                    
53gem "gitlab_git", '~> 8.2'
                    
                
Gemfile https://gitlab.com/leftathome/gitlab-ee | Gemfile | 349 lines
                    
9# Specify a sprockets version due to increased performance
                    
10# See https://gitlab.com/gitlab-org/gitlab-ce/issues/6069
                    
11gem 'sprockets', '~> 3.6.0'
                    
25gem 'omniauth-auth0',         '~> 1.4.1'
                    
26gem 'omniauth-azure-oauth2',  '~> 0.0.6'
                    
27gem 'omniauth-bitbucket',     '~> 0.0.2'
                    
30gem 'omniauth-github',        '~> 1.1.1'
                    
31gem 'omniauth-gitlab',        '~> 1.0.0'
                    
32gem 'omniauth-google-oauth2', '~> 0.2.0'
                    
38gem 'gssapi', group: :kerberos
                    
39gem 'rack-oauth2',            '~> 1.2.1'
                    
40gem 'jwt'
                    
50
                    
51# GitLab Pages
                    
52gem 'validates_hostname', '~> 1.0.0'
                    
                
README.md https://gitlab.com/demisxbar/gitlab-ce | Markdown | 61 lines
                    
1# GitLab Integration
                    
2
                    
2
                    
3GitLab integrates with multiple third-party services to allow external issue
                    
4trackers and external authentication.
                    
11- [OmniAuth](omniauth.md) Sign in via Twitter, GitHub, GitLab.com, Google, Bitbucket, Facebook, Shibboleth, SAML, Crowd and Azure
                    
12- [SAML](saml.md) Configure GitLab as a SAML 2.0 Service Provider
                    
13- [CAS](cas.md) Configure GitLab to sign in using CAS
                    
14- [Slack](slack.md) Integrate with the Slack chat service
                    
15- [OAuth2 provider](oauth_provider.md) OAuth2 application creation
                    
16- [Gmail actions buttons](gmail_action_buttons_for_gitlab.md) Adds GitLab actions to messages
                    
16- [Gmail actions buttons](gmail_action_buttons_for_gitlab.md) Adds GitLab actions to messages
                    
17- [reCAPTCHA](recaptcha.md) Configure GitLab to use Google reCAPTCHA for new users
                    
18- [Akismet](akismet.md) Configure Akismet to stop spam
                    
19
                    
20GitLab Enterprise Edition contains [advanced Jenkins support][jenkins].
                    
21
                    
                
README.md https://gitlab.com/deny7ko/gitlab-ce | Markdown | 47 lines
                    
6- [CI](ci/README.md) GitLab Continuous Integration (CI) getting started, .gitlab-ci.yml options, and examples.
                    
7- [GitLab as OAuth2 authentication service provider](integration/oauth_provider.md). It allows you to login to other applications from GitLab.
                    
8- [GitLab Basics](gitlab-basics/README.md) Find step by step how to start working on your commandline and on GitLab.
                    
17- [Webhooks](web_hooks/web_hooks.md) Let GitLab notify you when new code has been pushed to your project.
                    
18- [Workflow](workflow/README.md) Using GitLab functionality and importing projects from GitHub and SVN.
                    
19
                    
23- [Install](install/README.md) Requirements, directory structures and installation from source.
                    
24- [Restart GitLab](administration/restart_gitlab.md) Learn how to restart GitLab and its components
                    
25- [Integration](integration/README.md) How to integrate with systems such as JIRA, Redmine, LDAP and Twitter.
                    
36- [Reply by email](incoming_email/README.md) Allow users to comment on issues and merge requests by replying to notification emails.
                    
37- [Migrate GitLab CI to CE/EE](migrate_ci_to_ce/README.md) Follow this guide to migrate your existing GitLab CI data to GitLab CE/EE.
                    
38- [Git LFS configuration](workflow/lfs/lfs_administration.md)
                    
39- [Housekeeping](administration/housekeeping.md) Keep your Git repository tidy and fast.
                    
40- [GitLab Performance Monitoring](monitoring/performance/introduction.md) Configure GitLab and InfluxDB for measuring performance metrics
                    
41
                    
                
google.md https://gitlab.com/maur8ino/gitlab-ce | Markdown | 108 lines
                    
25    - Application type: "Web Application"
                    
26    - Authorized JavaScript origins: This isn't really used by GitLab but go ahead and put 'https://gitlab.example.com' here.
                    
27    - Authorized redirect URI: 'https://gitlab.example.com/users/auth/google_oauth2/callback'
                    
34    ```sh
                    
35      sudo editor /etc/gitlab/gitlab.rb
                    
36    ```
                    
52    ```ruby
                    
53      gitlab_rails['omniauth_providers'] = [
                    
54        {
                    
94
                    
95On the sign in page there should now be a Google icon below the regular sign in form. Click the icon to begin the authentication process. Google will ask the user to sign in and authorize the GitLab application. If everything goes well the user will be returned to GitLab and will be signed in.
                    
96
                    
107[reconfigure]: ../administration/restart_gitlab.md#omnibus-gitlab-reconfigure
                    
108[restart GitLab]: ../administration/restart_gitlab.md#installations-from-source
                    
109
                    
                
Gemfile https://gitlab.com/eisnerd/gitlab-ce | Gemfile | 347 lines
                    
23gem 'omniauth-auth0',         '~> 1.4.1'
                    
24gem 'omniauth-azure-oauth2',  '~> 0.0.6'
                    
25gem 'omniauth-bitbucket',     '~> 0.0.2'
                    
28gem 'omniauth-github',        '~> 1.1.1'
                    
29gem 'omniauth-gitlab',        '~> 1.0.0'
                    
30gem 'omniauth-google-oauth2', '~> 0.4.1'
                    
35gem 'omniauth_crowd',         '~> 2.2.0'
                    
36gem 'rack-oauth2',            '~> 1.2.1'
                    
37gem 'jwt'
                    
52# Extracting information from a git repository
                    
53# Provide access to Gitlab::Git library
                    
54gem 'gitlab_git', '~> 10.6.7'
                    
56# LDAP Auth
                    
57# GitLab fork with several improvements to original library. For full list of changes
                    
58# see https://github.com/intridea/omniauth-ldap/compare/master...gitlabhq:master
                    
                
README.md https://gitlab.com/javenhao/gitlab-ce | Markdown | 49 lines
                    
6- [CI](ci/README.md) GitLab Continuous Integration (CI) getting started, `.gitlab-ci.yml` options, and examples.
                    
7- [GitLab as OAuth2 authentication service provider](integration/oauth_provider.md). It allows you to login to other applications from GitLab.
                    
8- [GitLab Basics](gitlab-basics/README.md) Find step by step how to start working on your commandline and on GitLab.
                    
17- [Webhooks](web_hooks/web_hooks.md) Let GitLab notify you when new code has been pushed to your project.
                    
18- [Workflow](workflow/README.md) Using GitLab functionality and importing projects from GitHub and SVN.
                    
19
                    
25- [Install](install/README.md) Requirements, directory structures and installation from source.
                    
26- [Restart GitLab](administration/restart_gitlab.md) Learn how to restart GitLab and its components
                    
27- [Integration](integration/README.md) How to integrate with systems such as JIRA, Redmine, Twitter.
                    
38- [Reply by email](incoming_email/README.md) Allow users to comment on issues and merge requests by replying to notification emails.
                    
39- [Migrate GitLab CI to CE/EE](migrate_ci_to_ce/README.md) Follow this guide to migrate your existing GitLab CI data to GitLab CE/EE.
                    
40- [Git LFS configuration](workflow/lfs/lfs_administration.md)
                    
41- [Housekeeping](administration/housekeeping.md) Keep your Git repository tidy and fast.
                    
42- [GitLab Performance Monitoring](monitoring/performance/introduction.md) Configure GitLab and InfluxDB for measuring performance metrics
                    
43
                    
                
README.md https://gitlab.com/vcgato29/gitlab-ce | Markdown | 49 lines
                    
6- [CI](ci/README.md) GitLab Continuous Integration (CI) getting started, .gitlab-ci.yml options, and examples.
                    
7- [GitLab as OAuth2 authentication service provider](integration/oauth_provider.md). It allows you to login to other applications from GitLab.
                    
8- [GitLab Basics](gitlab-basics/README.md) Find step by step how to start working on your commandline and on GitLab.
                    
17- [Webhooks](web_hooks/web_hooks.md) Let GitLab notify you when new code has been pushed to your project.
                    
18- [Workflow](workflow/README.md) Using GitLab functionality and importing projects from GitHub and SVN.
                    
19
                    
25- [Install](install/README.md) Requirements, directory structures and installation from source.
                    
26- [Restart GitLab](administration/restart_gitlab.md) Learn how to restart GitLab and its components
                    
27- [Integration](integration/README.md) How to integrate with systems such as JIRA, Redmine, Twitter.
                    
38- [Reply by email](incoming_email/README.md) Allow users to comment on issues and merge requests by replying to notification emails.
                    
39- [Migrate GitLab CI to CE/EE](migrate_ci_to_ce/README.md) Follow this guide to migrate your existing GitLab CI data to GitLab CE/EE.
                    
40- [Git LFS configuration](workflow/lfs/lfs_administration.md)
                    
41- [Housekeeping](administration/housekeeping.md) Keep your Git repository tidy and fast.
                    
42- [GitLab Performance Monitoring](monitoring/performance/introduction.md) Configure GitLab and InfluxDB for measuring performance metrics
                    
43
                    
                
index.md https://gitlab.com/mmoll/gitlab-ce.git | Markdown | 48 lines
                    
13- **Integrations:**
                    
14  - [GitLab as OAuth2 authentication service provider](../../integration/oauth_provider.md#introduction-to-oauth)
                    
15  - [GitLab as OpenID Connect identity provider](../../integration/openid_connect_provider.md)
                    
23  - [How to Configure LDAP with GitLab CE](../../administration/auth/how_to_configure_ldap_gitlab_ce/index.md)
                    
24  - [How to Configure LDAP with GitLab EE](https://docs.gitlab.com/ee/articles/how_to_configure_ldap_gitlab_ee/)
                    
25  - [Feature Highlight: LDAP Integration](https://about.gitlab.com/2014/07/10/feature-highlight-ldap-sync/)
                    
33  - [Okta SSO provider](../../administration/auth/okta.md)
                    
34  - [Kerberos integration (GitLab EE)](https://docs.gitlab.com/ee/integration/kerberos.html)
                    
35
                    
40- [Impersonation tokens](../../api/README.md#impersonation-tokens)
                    
41- [GitLab as an OAuth2 provider](../../api/oauth2.md#gitlab-as-an-oauth2-provider)
                    
42
                    
46- [Jenkins GitLab OAuth Plugin](https://wiki.jenkins.io/display/JENKINS/GitLab+OAuth+Plugin)
                    
47- [How to customize GitLab to support OpenID authentication](http://eric.van-der-vlist.com/blog/2013/11/23/how-to-customize-gitlab-to-support-openid-authentication/)
                    
48- [OKD - Configuring Authentication and User Agent](https://docs.okd.io/latest/install_config/configuring_authentication.html#GitLab)
                    
                
README.md https://gitlab.com/miresevini2013/gitlab-ce | Markdown | 215 lines
                    
1# GitLab API
                    
2
                    
30Find API Clients for GitLab [on our website](https://about.gitlab.com/applications/#api-clients).
                    
31You can use [GitLab as an OAuth2 client](oauth2.md) to make API calls.
                    
32
                    
60
                    
61## Authentication with OAuth2 token
                    
62
                    
62
                    
63Instead of the private_token you can transmit the OAuth2 access token as a header or as a parameter.
                    
64
                    
64
                    
65### OAuth2 token (as a parameter)
                    
66
                    
76
                    
77Read more about [GitLab as an OAuth2 client](oauth2.md).
                    
78
                    
                
grack_auth.rb https://gitlab.com/AussieDan/gitlab-ce.git | Ruby | 160 lines
                    
15      # Need this if under RELATIVE_URL_ROOT
                    
16      unless Gitlab.config.gitlab.relative_url_root.empty?
                    
17        # If website is mounted using relative_url_root need to remove it first
                    
17        # If website is mounted using relative_url_root need to remove it first
                    
18        @env['PATH_INFO'] = @request.path.sub(Gitlab.config.gitlab.relative_url_root,'')
                    
19      else
                    
42        # if valid token passed
                    
43        if gitlab_ci_request?(login, password)
                    
44          return @app.call(env)
                    
49        if @user
                    
50          Gitlab::ShellEnv.set_env(@user)
                    
51          @env['REMOTE_USER'] = @auth.username
                    
62    def gitlab_ci_request?(login, password)
                    
63      if login == "gitlab-ci-token" && project.gitlab_ci?
                    
64        token = project.gitlab_ci_service.token
                    
                
auth_spec.rb https://gitlab.com/jacobvosmaer-gitlab/gitlab-ce | Ruby | 243 lines
                    
57      expect(gl_auth).to receive(:rate_limit!).with('ip', success: true, login: user.username)
                    
58      expect(gl_auth.find_for_git_client(user.username, 'password', project: nil, ip: 'ip')).to eq(Gitlab::Auth::Result.new(user, nil, :gitlab_or_ldap, full_authentication_abilities))
                    
59    end
                    
94        expect(gl_auth).to receive(:rate_limit!).with('ip', success: true, login: 'oauth2')
                    
95        expect(gl_auth.find_for_git_client("oauth2", token_w_api_scope.token, project: nil, ip: 'ip')).to eq(Gitlab::Auth::Result.new(user, nil, :oauth, read_authentication_abilities))
                    
96      end
                    
101        expect(gl_auth).to receive(:rate_limit!).with('ip', success: false, login: 'oauth2')
                    
102        expect(gl_auth.find_for_git_client("oauth2", token.token, project: nil, ip: 'ip')).to eq(Gitlab::Auth::Result.new(nil, nil))
                    
103      end
                    
143        expect(gl_auth.find_for_git_client(user.username, user.password, project: nil, ip: 'ip'))
                    
144          .to eq(Gitlab::Auth::Result.new(user, nil, :gitlab_or_ldap, full_authentication_abilities))
                    
145      end
                    
154        expect(gl_auth.find_for_git_client(user.username, user.password, project: nil, ip: 'ip'))
                    
155          .to eq(Gitlab::Auth::Result.new(user, nil, :gitlab_or_ldap, full_authentication_abilities))
                    
156      end
                    
                
Gemfile https://gitlab.com/avivo/gitlab-ce | Gemfile | 335 lines
                    
9# Specify a sprockets version due to increased performance
                    
10# See https://gitlab.com/gitlab-org/gitlab-ce/issues/6069
                    
11gem 'sprockets', '~> 3.6.0'
                    
24gem 'omniauth-auth0',         '~> 1.4.1'
                    
25gem 'omniauth-azure-oauth2',  '~> 0.0.6'
                    
26gem 'omniauth-bitbucket',     '~> 0.0.2'
                    
29gem 'omniauth-github',        '~> 1.1.1'
                    
30gem 'omniauth-gitlab',        '~> 1.0.0'
                    
31gem 'omniauth-google-oauth2', '~> 0.2.0'
                    
36gem 'omniauth_crowd',         '~> 2.2.0'
                    
37gem 'rack-oauth2',            '~> 1.2.1'
                    
38
                    
51# Extracting information from a git repository
                    
52# Provide access to Gitlab::Git library
                    
53gem "gitlab_git", '~> 10.0'
                    
                
auth.rb https://gitlab.com/tmaczukin/gitlab-ce.git | Ruby | 228 lines
                    
6
                    
7    # Scopes used for GitLab API access
                    
8    API_SCOPES = [:api, :read_user].freeze
                    
37        rate_limit!(ip, success: result.success?, login: login)
                    
38        Gitlab::Auth::UniqueIpsLimiter.limit_user!(result.actor)
                    
39
                    
98          if service && service.activated? && service.valid_token?(password)
                    
99            Gitlab::Auth::Result.new(nil, project, :ci, build_authentication_abilities)
                    
100          end
                    
109
                    
110        Gitlab::Auth::Result.new(user, nil, :gitlab_or_ldap, full_authentication_abilities)
                    
111      end
                    
113      def oauth_access_token_check(login, password)
                    
114        if login == "oauth2" && password.present?
                    
115          token = Doorkeeper::AccessToken.by_token(password)
                    
                
oauth2.md https://gitlab.com/demisxbar/gitlab-ce | Markdown | 102 lines
                    
1# GitLab as an OAuth2 client
                    
2
                    
3This document is about using other OAuth authentication service providers to sign into GitLab.
                    
4If you want GitLab to be an OAuth authentication service provider to sign into other services please see the [Oauth2 provider documentation](../integration/oauth_provider.md).
                    
5
                    
5
                    
6OAuth2 is a protocol that enables us to authenticate a user without requiring them to give their password. 
                    
7
                    
7
                    
8Before using the OAuth2 you should create an application in user's account. Each application gets a unique App ID and App Secret parameters. You should not share these.
                    
9
                    
95
                    
96For testing you can use the oauth2 ruby gem:
                    
97
                    
98```
                    
99client = OAuth2::Client.new('the_client_id', 'the_client_secret', :site => "http://example.com")
                    
100access_token = client.password.get_token('user@example.com', 'sekret')
                    
                
auth_helper.rb https://gitlab.com/alexcern/gitlab-ee | Ruby | 118 lines
                    
3module AuthHelper
                    
4  PROVIDERS_WITH_ICONS = %w(twitter github gitlab bitbucket google_oauth2 facebook azure_oauth2 authentiq).freeze
                    
5  LDAP_PROVIDER = /\Aldap/.freeze
                    
7  def ldap_enabled?
                    
8    Gitlab::Auth::LDAP::Config.enabled?
                    
9  end
                    
11  def omniauth_enabled?
                    
12    Gitlab::Auth.omniauth_enabled?
                    
13  end
                    
26  def auth_providers
                    
27    Gitlab::Auth::OAuth::Provider.providers
                    
28  end
                    
30  def label_for_provider(name)
                    
31    Gitlab::Auth::OAuth::Provider.label_for(name)
                    
32  end
                    
                
Gemfile https://gitlab.com/luodengwei/gitlab-ce.git | Gemfile | 274 lines
                    
40# Provide access to Gitlab::Git library
                    
41gem "gitlab_git", '~> 7.2.6'
                    
42
                    
43# Ruby/Rack Git Smart-HTTP Server Handler
                    
44# GitLab fork with a lot of changes (improved thread-safety, better memory usage etc)
                    
45# For full list of changes see https://github.com/SaitoWu/grack/compare/master...gitlabhq:master
                    
50# see https://github.com/intridea/omniauth-ldap/compare/master...gitlabhq:master
                    
51gem 'gitlab_omniauth-ldap', '1.2.1', require: "omniauth-ldap"
                    
52
                    
56# Language detection
                    
57# GitLab fork of linguist does not require pygments/python dependency.
                    
58# New version of original gem also dropped pygments support but it has strict
                    
59# dependency to unstable rugged version. We have internal issue for replacing
                    
60# fork with original gem when we meet on same rugged version - https://dev.gitlab.org/gitlab/gitlabhq/issues/2052.
                    
61gem "gitlab-linguist", "~> 3.0.1", require: "linguist"
                    
                
Gemfile https://gitlab.com/vernik91/gitlab-ce.git | Gemfile | 274 lines
                    
40# Provide access to Gitlab::Git library
                    
41gem "gitlab_git", '~> 7.2.11'
                    
42
                    
43# Ruby/Rack Git Smart-HTTP Server Handler
                    
44# GitLab fork with a lot of changes (improved thread-safety, better memory usage etc)
                    
45# For full list of changes see https://github.com/SaitoWu/grack/compare/master...gitlabhq:master
                    
50# see https://github.com/intridea/omniauth-ldap/compare/master...gitlabhq:master
                    
51gem 'gitlab_omniauth-ldap', '1.2.1', require: "omniauth-ldap"
                    
52
                    
56# Language detection
                    
57# GitLab fork of linguist does not require pygments/python dependency.
                    
58# New version of original gem also dropped pygments support but it has strict
                    
59# dependency to unstable rugged version. We have internal issue for replacing
                    
60# fork with original gem when we meet on same rugged version - https://dev.gitlab.org/gitlab/gitlabhq/issues/2052.
                    
61gem "gitlab-linguist", "~> 3.0.1", require: "linguist"
                    
                
index.md https://gitlab.com/axil/gitlab | Markdown | 144 lines
                    
25
                    
26> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/issues/45912) in GitLab 11.4.
                    
27
                    
43  applications. The simplest way to get started is to add a cluster using one
                    
44  of the [GitLab integrations](../add_remove_clusters.md#create-new-cluster).
                    
45- **Ingress** - Ingress can provide load balancing, SSL termination, and name-based
                    
62
                    
63Follow this step-by-step guide to configure an executable runbook in GitLab using
                    
64the components outlined above and the pre-loaded demo runbook.
                    
81   JupyterHub and start the server. Authentication is enabled for any user of the
                    
82   GitLab instance with OAuth2. This button redirects you to a page at GitLab
                    
83   requesting authorization for JupyterHub to use your GitLab account.
                    
132
                    
133      ![GitLab variables](img/gitlab-variables.png)
                    
134
                    
                
Gemfile https://gitlab.com/Venator/gitlab-ce.git | Gemfile | 274 lines
                    
24gem 'omniauth-kerberos', group: :kerberos
                    
25gem 'omniauth-gitlab'
                    
26gem 'omniauth-bitbucket'
                    
40# Extracting information from a git repository
                    
41# Provide access to Gitlab::Git library
                    
42gem "gitlab_git", '~> 7.2.15'
                    
44# LDAP Auth
                    
45# GitLab fork with several improvements to original library. For full list of changes
                    
46# see https://github.com/intridea/omniauth-ldap/compare/master...gitlabhq:master
                    
52# Language detection
                    
53# GitLab fork of linguist does not require pygments/python dependency.
                    
54# New version of original gem also dropped pygments support but it has strict
                    
55# dependency to unstable rugged version. We have internal issue for replacing
                    
56# fork with original gem when we meet on same rugged version - https://dev.gitlab.org/gitlab/gitlabhq/issues/2052.
                    
57gem "gitlab-linguist", "~> 3.0.1", require: "linguist"
                    
                
README.md https://gitlab.com/janten/gitlab-ce.git | Markdown | 65 lines
                    
2
                    
3GitLab integrates with multiple third-party services to allow external issue
                    
4trackers and external authentication.
                    
10- [LDAP](ldap.md) Set up sign in via LDAP
                    
11- [OmniAuth](omniauth.md) Sign in via Twitter, GitHub, GitLab.com, Google, Bitbucket, Facebook, Shibboleth, SAML, Crowd and Azure
                    
12- [SAML](saml.md) Configure GitLab as a SAML 2.0 Service Provider
                    
13- [CAS](cas.md) Configure GitLab to sign in using CAS
                    
14- [OAuth2 provider](oauth_provider.md) OAuth2 application creation
                    
15- [Gmail actions buttons](gmail_action_buttons_for_gitlab.md) Adds GitLab actions to messages
                    
19
                    
20GitLab Enterprise Edition contains [advanced Jenkins support][jenkins].
                    
21
                    
21
                    
22[jenkins]: http://docs.gitlab.com/ee/integration/jenkins.html
                    
23
                    
                
Gemfile https://gitlab.com/ahmed-naguib13/gitlab-ce | Gemfile | 341 lines
                    
9# Specify a sprockets version due to increased performance
                    
10# See https://gitlab.com/gitlab-org/gitlab-ce/issues/6069
                    
11gem 'sprockets', '~> 3.6.0'
                    
24gem 'omniauth-auth0',         '~> 1.4.1'
                    
25gem 'omniauth-azure-oauth2',  '~> 0.0.6'
                    
26gem 'omniauth-bitbucket',     '~> 0.0.2'
                    
29gem 'omniauth-github',        '~> 1.1.1'
                    
30gem 'omniauth-gitlab',        '~> 1.0.0'
                    
31gem 'omniauth-google-oauth2', '~> 0.2.0'
                    
36gem 'omniauth_crowd',         '~> 2.2.0'
                    
37gem 'rack-oauth2',            '~> 1.2.1'
                    
38gem 'jwt'
                    
52# Extracting information from a git repository
                    
53# Provide access to Gitlab::Git library
                    
54gem "gitlab_git", '~> 10.0'
                    
                
install_all.sh https://gitlab.com/vilma_unicamp/vilma_car | Shell | 17 lines
                    
5    pip install gspread
                    
6    pip install --upgrade oauth2client
                    
7    pip install PyOpenSSL
                    
11git clone  https://github.com/srv/viso2.git
                    
12git clone https://gitlab.com/vilma_unicamp/vilma_planning.git
                    
13git clone https://gitlab.com/vilma_unicamp/vilma_ma_ros.git
                    
13git clone https://gitlab.com/vilma_unicamp/vilma_ma_ros.git
                    
14git clone https://gitlab.com/vilma_unicamp/vilma_localization.git
                    
15git clone https://gitlab.com/vilma_unicamp/vilma_real_time.git
                    
15git clone https://gitlab.com/vilma_unicamp/vilma_real_time.git
                    
16git clone https://gitlab.com/vilma_unicamp/vilma_perception.git
                    
17git clone https://gitlab.com/vilma_unicamp/vilma_simulator.git
                    
                
 

Source

Language