当前位置: 首页>>代码示例>>Java>>正文


Java CanonicalWebUrl类代码示例

本文整理汇总了Java中com.google.gerrit.httpd.CanonicalWebUrl的典型用法代码示例。如果您正苦于以下问题:Java CanonicalWebUrl类的具体用法?Java CanonicalWebUrl怎么用?Java CanonicalWebUrl使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


CanonicalWebUrl类属于com.google.gerrit.httpd包,在下文中一共展示了CanonicalWebUrl类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: OAuthSessionOverOpenID

import com.google.gerrit.httpd.CanonicalWebUrl; //导入依赖的package包/类
@Inject
OAuthSessionOverOpenID(
    DynamicItem<WebSession> webSession,
    Provider<IdentifiedUser> identifiedUser,
    AccountManager accountManager,
    CanonicalWebUrl urlProvider) {
  this.state = generateRandomState();
  this.webSession = webSession;
  this.identifiedUser = identifiedUser;
  this.accountManager = accountManager;
  this.urlProvider = urlProvider;
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:13,代码来源:OAuthSessionOverOpenID.java

示例2: OpenIdServiceImpl

import com.google.gerrit.httpd.CanonicalWebUrl; //导入依赖的package包/类
@Inject
OpenIdServiceImpl(
    DynamicItem<WebSession> cf,
    Provider<IdentifiedUser> iu,
    CanonicalWebUrl up,
    @GerritServerConfig Config config,
    AuthConfig ac,
    AccountManager am,
    ProxyProperties proxyProperties) {

  if (proxyProperties.getProxyUrl() != null) {
    final org.openid4java.util.ProxyProperties proxy = new org.openid4java.util.ProxyProperties();
    URL url = proxyProperties.getProxyUrl();
    proxy.setProxyHostName(url.getHost());
    proxy.setProxyPort(url.getPort());
    proxy.setUserName(proxyProperties.getUsername());
    proxy.setPassword(proxyProperties.getPassword());
    HttpClientFactory.setProxyProperties(proxy);
  }

  webSession = cf;
  identifiedUser = iu;
  urlProvider = up;
  accountManager = am;
  manager = new ConsumerManager();
  allowedOpenIDs = ac.getAllowedOpenIDs();
  openIdDomains = ac.getOpenIdDomains();
  papeMaxAuthAge =
      (int)
          ConfigUtil.getTimeUnit(
              config, //
              "auth",
              null,
              "maxOpenIdSessionAge",
              -1,
              TimeUnit.SECONDS);
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:38,代码来源:OpenIdServiceImpl.java

示例3: OAuthSession

import com.google.gerrit.httpd.CanonicalWebUrl; //导入依赖的package包/类
@Inject
OAuthSession(
    DynamicItem<WebSession> webSession,
    Provider<IdentifiedUser> identifiedUser,
    AccountManager accountManager,
    CanonicalWebUrl urlProvider,
    OAuthTokenCache tokenCache) {
  this.state = generateRandomState();
  this.identifiedUser = identifiedUser;
  this.webSession = webSession;
  this.accountManager = accountManager;
  this.urlProvider = urlProvider;
  this.tokenCache = tokenCache;
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:15,代码来源:OAuthSession.java

示例4: LdapLoginServlet

import com.google.gerrit.httpd.CanonicalWebUrl; //导入依赖的package包/类
@Inject
LdapLoginServlet(
    AccountManager accountManager,
    DynamicItem<WebSession> webSession,
    CanonicalWebUrl urlProvider,
    SiteHeaderFooter headers) {
  this.accountManager = accountManager;
  this.webSession = webSession;
  this.urlProvider = urlProvider;
  this.headers = headers;
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:12,代码来源:LdapLoginServlet.java

示例5: HttpLoginServlet

import com.google.gerrit.httpd.CanonicalWebUrl; //导入依赖的package包/类
@Inject
HttpLoginServlet(
    final DynamicItem<WebSession> webSession,
    final CanonicalWebUrl urlProvider,
    final AccountManager accountManager,
    final HttpAuthFilter authFilter,
    final AuthConfig authConfig) {
  this.webSession = webSession;
  this.urlProvider = urlProvider;
  this.accountManager = accountManager;
  this.authFilter = authFilter;
  this.authConfig = authConfig;
}
 
开发者ID:gerrit-review,项目名称:gerrit,代码行数:14,代码来源:HttpLoginServlet.java

示例6: GitHubConfig

import com.google.gerrit.httpd.CanonicalWebUrl; //导入依赖的package包/类
@Inject
public GitHubConfig(
    @GerritServerConfig Config config,
    final SitePaths site,
    AllProjectsNameProvider allProjectsNameProvider,
    CanonicalWebUrl canonicalWebUrl,
    AuthConfig authConfig)
    throws MalformedURLException {
  super(config, canonicalWebUrl, authConfig);
  String[] wizardFlows = config.getStringList(CONF_SECTION, null, CONF_WIZARD_FLOW);
  for (String fromTo : wizardFlows) {
    boolean redirect = fromTo.indexOf(FROM_TO_REDIRECT_SEPARATOR) > 0;
    int sepPos = getSepPos(fromTo, redirect);
    String fromPage = fromTo.substring(0, sepPos).trim();
    NextPage toPage =
        new NextPage(
            fromTo.substring(sepPos + getSeparator(redirect).length() + 1).trim(), redirect);
    wizardFromTo.put(fromPage, toPage);
  }

  jobPoolLimit = config.getInt(CONF_SECTION, CONF_JOB_POOL_LIMIT, 5);
  jobExecTimeout = config.getInt(CONF_SECTION, CONF_JOB_EXEC_TIMEOUT, 10);
  pullRequestListLimit = config.getInt(CONF_SECTION, CONF_PULL_REQUEST_LIST_LIMIT, 50);
  repositoryListPageSize = config.getInt(CONF_SECTION, CONF_REPOSITORY_LIST_PAGE_SIZE, 50);
  repositoryListLimit = config.getInt(CONF_SECTION, CONF_REPOSITORY_LIST_LIMIT, 50);

  gitDir = site.resolve(config.getString("gerrit", null, "basePath"));
  if (gitDir == null) {
    throw new IllegalStateException("gerrit.basePath must be configured");
  }

  privateBaseProject = config.getString(CONF_SECTION, null, CONF_PRIVATE_BASE_PROJECT);
  publicBaseProject = config.getString(CONF_SECTION, null, CONF_PUBLIC_BASE_PROJECT);
  allProjectsName = allProjectsNameProvider.get().toString();
  webhookSecret = config.getString(CONF_SECTION, null, CONF_WEBHOOK_SECRET);
  webhookUser = config.getString(CONF_SECTION, null, CONF_WEBHOOK_USER);
}
 
开发者ID:GerritCodeReview,项目名称:plugins_github,代码行数:38,代码来源:GitHubConfig.java

示例7: GitHubOAuthConfig

import com.google.gerrit.httpd.CanonicalWebUrl; //导入依赖的package包/类
@Inject
protected GitHubOAuthConfig(
    @GerritServerConfig Config config, CanonicalWebUrl canonicalWebUrl, AuthConfig authConfig) {
  this.config = config;
  this.canonicalWebUrl = canonicalWebUrl;

  httpHeader =
      Preconditions.checkNotNull(
          config.getString("auth", null, "httpHeader"),
          "HTTP Header for GitHub user must be provided");
  gitHubUrl =
      trimTrailingSlash(
          MoreObjects.firstNonNull(
              config.getString(CONF_SECTION, null, "url"), GITHUB_URL_DEFAULT));
  gitHubApiUrl =
      trimTrailingSlash(
          MoreObjects.firstNonNull(
              config.getString(CONF_SECTION, null, "apiUrl"), GITHUB_API_URL_DEFAULT));
  gitHubClientId =
      Preconditions.checkNotNull(
          config.getString(CONF_SECTION, null, "clientId"), "GitHub `clientId` must be provided");
  gitHubClientSecret =
      Preconditions.checkNotNull(
          config.getString(CONF_SECTION, null, "clientSecret"),
          "GitHub `clientSecret` must be provided");

  oauthHttpHeader = config.getString("auth", null, "httpExternalIdHeader");
  gitHubOAuthUrl = gitHubUrl + GITHUB_OAUTH_AUTHORIZE;
  gitHubOAuthAccessTokenUrl = gitHubUrl + GITHUB_OAUTH_ACCESS_TOKEN;
  logoutRedirectUrl = config.getString(CONF_SECTION, null, "logoutRedirectUrl");

  enabled = config.getString("auth", null, "type").equalsIgnoreCase(AuthType.HTTP.toString());
  scopes = getScopes(config);

  fileUpdateMaxRetryCount = config.getInt(CONF_SECTION, "fileUpdateMaxRetryCount", 3);
  fileUpdateMaxRetryIntervalMsec =
      config.getInt(CONF_SECTION, "fileUpdateMaxRetryIntervalMsec", 3000);

  httpConnectionTimeout =
      TimeUnit.MILLISECONDS.convert(
          ConfigUtil.getTimeUnit(
              config, CONF_SECTION, null, "httpConnectionTimeout", 30, TimeUnit.SECONDS),
          TimeUnit.SECONDS);

  httpReadTimeout =
      TimeUnit.MILLISECONDS.convert(
          ConfigUtil.getTimeUnit(
              config, CONF_SECTION, null, "httpReadTimeout", 30, TimeUnit.SECONDS),
          TimeUnit.SECONDS);
}
 
开发者ID:GerritCodeReview,项目名称:plugins_github,代码行数:51,代码来源:GitHubOAuthConfig.java


注:本文中的com.google.gerrit.httpd.CanonicalWebUrl类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。