本文整理汇总了Java中com.google.gerrit.server.IdentifiedUser.RequestFactory方法的典型用法代码示例。如果您正苦于以下问题:Java IdentifiedUser.RequestFactory方法的具体用法?Java IdentifiedUser.RequestFactory怎么用?Java IdentifiedUser.RequestFactory使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gerrit.server.IdentifiedUser
的用法示例。
在下文中一共展示了IdentifiedUser.RequestFactory方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: CacheBasedWebSession
import com.google.gerrit.server.IdentifiedUser; //导入方法依赖的package包/类
protected CacheBasedWebSession(
HttpServletRequest request,
HttpServletResponse response,
WebSessionManager manager,
AuthConfig authConfig,
Provider<AnonymousUser> anonymousProvider,
IdentifiedUser.RequestFactory identified) {
this.request = request;
this.response = response;
this.manager = manager;
this.authConfig = authConfig;
this.anonymousProvider = anonymousProvider;
this.identified = identified;
if (request.getRequestURI() == null || !GitSmartHttpTools.isGitClient(request)) {
String cookie = readCookie(request);
if (cookie != null) {
authFromCookie(cookie);
} else {
String token;
try {
token = ParameterParser.getQueryParams(request).accessToken();
} catch (BadRequestException e) {
token = null;
}
if (token != null) {
authFromQueryParameter(token);
}
}
if (val != null && val.needsCookieRefresh()) {
// Session is more than half old; update cache entry with new expiration date.
val = manager.createVal(key, val);
}
}
}
示例2: SshScope
import com.google.gerrit.server.IdentifiedUser; //导入方法依赖的package包/类
@Inject
SshScope(ThreadLocalRequestContext local, IdentifiedUser.RequestFactory userFactory) {
this.local = local;
this.userFactory = userFactory;
}