e9707d8f85
Further development of OAuth authentication scheme support suggested in I86fb8fab3 is to restrict the core to expose only the OAuth extension point and use Gerrit plugin concept for OAuth provider implementations. When multiple OAuth providers are deployed on Gerrit site (from one or multiple plugins) selection page is shown to select OAuth provider per user base (as it's known for OpenID authentication scheme). The only difference is that the user can only select between deployed providers. OAuth logo was borrowed from: http://en.wikipedia.org/wiki/OAuth and http://en.wikipedia.org/wiki/File:Oauth_logo.svg The OAuth logo, designed by Chris Messina Creative Commons Attribution-Share Alike 3.0 Unported license Converted as base64 using: http://www.base64-image.de Source for OAuth protocol description: the same link as above. Bug: issue 2677 Bug: issue 2715 Contributed-by: Luca Milanesio <luca.milanesio@gmail.com> Change-Id: I7da0a6b3f2a99b6188bd14cf2818f673a3ddd680
152 lines
3.5 KiB
Python
152 lines
3.5 KiB
Python
SRCS = 'src/main/java/com/google/gerrit/pgm/'
|
|
|
|
INIT_API_SRCS = [SRCS + n for n in [
|
|
'init/AllProjectsConfig.java',
|
|
'init/AllProjectsNameOnInitProvider.java',
|
|
'util/ConsoleUI.java',
|
|
'init/InitFlags.java',
|
|
'init/InitStep.java',
|
|
'init/InitStep.java',
|
|
'init/InstallPlugins.java',
|
|
'init/Section.java',
|
|
]]
|
|
|
|
java_library(
|
|
name = 'init-api',
|
|
srcs = INIT_API_SRCS,
|
|
deps = [
|
|
'//gerrit-common:annotations',
|
|
'//gerrit-common:server',
|
|
'//gerrit-reviewdb:server',
|
|
'//gerrit-server:server',
|
|
'//lib:guava',
|
|
'//lib/guice:guice',
|
|
'//lib/guice:guice-assistedinject',
|
|
'//lib/jgit:jgit',
|
|
],
|
|
visibility = ['PUBLIC'],
|
|
)
|
|
|
|
java_sources(
|
|
name = 'init-api-src',
|
|
srcs = INIT_API_SRCS,
|
|
visibility = ['PUBLIC'],
|
|
)
|
|
|
|
INIT_BASE_SRCS = [SRCS + 'BaseInit.java'] + glob(
|
|
[SRCS + n for n in [
|
|
'init/**/*.java',
|
|
'util/**/*.java',
|
|
]],
|
|
excludes = INIT_API_SRCS +
|
|
[SRCS + n for n in [
|
|
'init/Browser.java',
|
|
'util/ErrorLogFile.java',
|
|
'util/GarbageCollectionLogFile.java',
|
|
'util/LogFileCompressor.java',
|
|
'util/RuntimeShutdown.java',
|
|
]]
|
|
)
|
|
|
|
INIT_BASE_RSRCS = ['src/main/resources/com/google/gerrit/pgm/libraries.config']
|
|
|
|
java_library(
|
|
name = 'init-base',
|
|
srcs = INIT_BASE_SRCS,
|
|
resources = INIT_BASE_RSRCS,
|
|
deps = [
|
|
':init-api',
|
|
'//gerrit-common:server',
|
|
'//gerrit-extension-api:api',
|
|
'//gerrit-lucene:lucene',
|
|
'//gerrit-reviewdb:server',
|
|
'//gerrit-server:server',
|
|
'//gerrit-util-cli:cli',
|
|
'//lib/commons:dbcp',
|
|
'//lib/guice:guice',
|
|
'//lib/guice:guice-assistedinject',
|
|
'//lib/jgit:jgit',
|
|
'//lib/mina:sshd',
|
|
'//lib:args4j',
|
|
'//lib:guava',
|
|
'//lib:gwtjsonrpc',
|
|
'//lib:gwtorm',
|
|
'//lib/log:api',
|
|
],
|
|
provided_deps = ['//gerrit-launcher:launcher'],
|
|
visibility = [
|
|
'//gerrit-war:',
|
|
'//gerrit-acceptance-tests/...',
|
|
],
|
|
)
|
|
|
|
java_library(
|
|
name = 'pgm',
|
|
srcs = glob(
|
|
['src/main/java/**/*.java'],
|
|
excludes = INIT_API_SRCS + INIT_BASE_SRCS
|
|
),
|
|
resources = glob(
|
|
['src/main/resources/**/*'],
|
|
excludes = INIT_BASE_RSRCS),
|
|
deps = [
|
|
':init-api',
|
|
':init-base',
|
|
'//gerrit-cache-h2:cache-h2',
|
|
'//gerrit-common:server',
|
|
'//gerrit-extension-api:api',
|
|
'//gerrit-gwtexpui:linker_server',
|
|
'//gerrit-gwtexpui:server',
|
|
'//gerrit-httpd:httpd',
|
|
'//gerrit-lucene:lucene',
|
|
'//gerrit-oauth:oauth',
|
|
'//gerrit-openid:openid',
|
|
'//gerrit-reviewdb:server',
|
|
'//gerrit-server:server',
|
|
'//gerrit-server/src/main/prolog:common',
|
|
'//gerrit-solr:solr',
|
|
'//gerrit-sshd:sshd',
|
|
'//gerrit-util-cli:cli',
|
|
'//lib:args4j',
|
|
'//lib:guava',
|
|
'//lib:gwtorm',
|
|
'//lib:h2',
|
|
'//lib:servlet-api-3_1',
|
|
'//lib/guice:guice',
|
|
'//lib/guice:guice-assistedinject',
|
|
'//lib/guice:guice-servlet',
|
|
'//lib/jetty:server',
|
|
'//lib/jetty:servlet',
|
|
'//lib/jetty:jmx',
|
|
'//lib/jgit:jgit',
|
|
'//lib/log:api',
|
|
'//lib/log:log4j',
|
|
'//lib/lucene:core',
|
|
'//lib/prolog:prolog-cafe',
|
|
],
|
|
provided_deps = ['//gerrit-launcher:launcher'],
|
|
visibility = [
|
|
'//:',
|
|
'//gerrit-acceptance-tests/...',
|
|
'//tools/eclipse:classpath',
|
|
'//Documentation:licenses.txt',
|
|
],
|
|
)
|
|
|
|
java_test(
|
|
name = 'pgm_tests',
|
|
srcs = glob(['src/test/java/**/*.java']),
|
|
deps = [
|
|
':init-api',
|
|
':init-base',
|
|
':pgm',
|
|
'//gerrit-server:server',
|
|
'//lib:junit',
|
|
'//lib/easymock:easymock',
|
|
'//lib/guice:guice',
|
|
'//lib/jgit:jgit',
|
|
'//lib/jgit:junit',
|
|
],
|
|
source_under_test = [':pgm'],
|
|
)
|