本文整理了Java中org.eclipse.jetty.server.Request.setAuthentication
方法的一些代码示例,展示了Request.setAuthentication
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.setAuthentication
方法的具体详情如下:
包路径:org.eclipse.jetty.server.Request
类名称:Request
方法名:setAuthentication
[英]Set the authentication.
[中]设置身份验证。
代码示例来源:origin: org.eclipse.jetty/jetty-security
baseRequest.setAuthentication(authentication);
if (_identityService!=null)
previousIdentity = _identityService.associate(userAuth.getUserIdentity());
baseRequest.setAuthentication(authentication);
baseRequest.setAuthentication(authentication);
if (_identityService!=null)
previousIdentity = _identityService.associate(null);
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.jetty.server
@Override
public boolean authenticate(HttpServletResponse response) throws IOException, ServletException
{
if (_authentication instanceof Authentication.Deferred)
{
setAuthentication(((Authentication.Deferred)_authentication).authenticate(this,response));
return !(_authentication instanceof Authentication.ResponseSent);
}
response.sendError(HttpStatus.UNAUTHORIZED_401);
return false;
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-plus
public boolean authenticate(HttpServletResponse response) throws IOException, ServletException
{
if (_authentication instanceof Authentication.Deferred)
{
setAuthentication(((Authentication.Deferred)_authentication).authenticate(this,response));
return !(_authentication instanceof Authentication.ResponseSent);
}
response.sendError(HttpStatus.UNAUTHORIZED_401);
return false;
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-webapp
public UserIdentity getUserIdentity()
{
if (_authentication instanceof Authentication.Deferred)
setAuthentication(((Authentication.Deferred)_authentication).authenticate(this));
if (_authentication instanceof Authentication.User)
return ((Authentication.User)_authentication).getUserIdentity();
return null;
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-server
public boolean isUserInRole(String role)
{
if (_authentication instanceof Authentication.Deferred)
setAuthentication(((Authentication.Deferred)_authentication).authenticate(this));
if (_authentication instanceof Authentication.User)
return ((Authentication.User)_authentication).isUserInRole(_scope,role);
return false;
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.jetty.server
@Override
public String getAuthType()
{
if (_authentication instanceof Authentication.Deferred)
setAuthentication(((Authentication.Deferred)_authentication).authenticate(this));
if (_authentication instanceof Authentication.User)
return ((Authentication.User)_authentication).getAuthMethod();
return null;
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-plus
public String getAuthType()
{
if (_authentication instanceof Authentication.Deferred)
setAuthentication(((Authentication.Deferred)_authentication).authenticate(this));
if (_authentication instanceof Authentication.User)
return ((Authentication.User)_authentication).getAuthMethod();
return null;
}
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
@Override
public String getAuthType()
{
if (_authentication instanceof Authentication.Deferred)
setAuthentication(((Authentication.Deferred)_authentication).authenticate(this));
if (_authentication instanceof Authentication.User)
return ((Authentication.User)_authentication).getAuthMethod();
return null;
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-webapp
public boolean isUserInRole(String role)
{
if (_authentication instanceof Authentication.Deferred)
setAuthentication(((Authentication.Deferred)_authentication).authenticate(this));
if (_authentication instanceof Authentication.User)
return ((Authentication.User)_authentication).isUserInRole(_scope,role);
return false;
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-server
public UserIdentity getUserIdentity()
{
if (_authentication instanceof Authentication.Deferred)
setAuthentication(((Authentication.Deferred)_authentication).authenticate(this));
if (_authentication instanceof Authentication.User)
return ((Authentication.User)_authentication).getUserIdentity();
return null;
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-plus
public UserIdentity getUserIdentity()
{
if (_authentication instanceof Authentication.Deferred)
setAuthentication(((Authentication.Deferred)_authentication).authenticate(this));
if (_authentication instanceof Authentication.User)
return ((Authentication.User)_authentication).getUserIdentity();
return null;
}
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
public UserIdentity getUserIdentity()
{
if (_authentication instanceof Authentication.Deferred)
setAuthentication(((Authentication.Deferred)_authentication).authenticate(this));
if (_authentication instanceof Authentication.User)
return ((Authentication.User)_authentication).getUserIdentity();
return null;
}
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
@Override
public boolean isUserInRole(String role)
{
if (_authentication instanceof Authentication.Deferred)
setAuthentication(((Authentication.Deferred)_authentication).authenticate(this));
if (_authentication instanceof Authentication.User)
return ((Authentication.User)_authentication).isUserInRole(_scope,role);
return false;
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server
public String getAuthType()
{
if (_authentication instanceof Authentication.Deferred)
setAuthentication(((Authentication.Deferred)_authentication).authenticate(this));
if (_authentication instanceof Authentication.User)
return ((Authentication.User)_authentication).getAuthMethod();
return null;
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server
public UserIdentity getUserIdentity()
{
if (_authentication instanceof Authentication.Deferred)
setAuthentication(((Authentication.Deferred)_authentication).authenticate(this));
if (_authentication instanceof Authentication.User)
return ((Authentication.User)_authentication).getUserIdentity();
return null;
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server
public Principal getUserPrincipal()
{
if (_authentication instanceof Authentication.Deferred)
setAuthentication(((Authentication.Deferred)_authentication).authenticate(this));
if (_authentication instanceof Authentication.User)
{
UserIdentity user = ((Authentication.User)_authentication).getUserIdentity();
return user.getUserPrincipal();
}
return null;
}
代码示例来源:origin: org.ops4j.pax.web/pax-web-jetty
private OsgiAuth getOsgiAuth() {
OsgiAuth auth;
if (request.getAuthentication() instanceof OsgiAuth) {
auth = (OsgiAuth) request.getAuthentication();
} else {
auth = new OsgiAuth();
request.setAuthentication(auth);
}
return auth;
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
@Override
public Principal getUserPrincipal()
{
if (_authentication instanceof Authentication.Deferred)
setAuthentication(((Authentication.Deferred)_authentication).authenticate(this));
if (_authentication instanceof Authentication.User)
{
UserIdentity user = ((Authentication.User)_authentication).getUserIdentity();
return user.getUserPrincipal();
}
return null;
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.jetty.server
@Override
public Principal getUserPrincipal()
{
if (_authentication instanceof Authentication.Deferred)
setAuthentication(((Authentication.Deferred)_authentication).authenticate(this));
if (_authentication instanceof Authentication.User)
{
UserIdentity user = ((Authentication.User)_authentication).getUserIdentity();
return user.getUserPrincipal();
}
return null;
}
代码示例来源:origin: org.eclipse.jetty/server
public Principal getUserPrincipal()
{
if (_authentication instanceof Authentication.Deferred)
setAuthentication(((Authentication.Deferred)_authentication).authenticate(this));
if (_authentication instanceof Authentication.User)
{
UserIdentity user = ((Authentication.User)_authentication).getUserIdentity();
return user.getUserPrincipal();
}
return null;
}
内容来源于网络,如有侵权,请联系作者删除!