org.eclipse.jetty.server.Request.getAuthType()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(5.4k)|赞(0)|评价(0)|浏览(200)

本文整理了Java中org.eclipse.jetty.server.Request.getAuthType方法的一些代码示例,展示了Request.getAuthType的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.getAuthType方法的具体详情如下:
包路径:org.eclipse.jetty.server.Request
类名称:Request
方法名:getAuthType

Request.getAuthType介绍

暂无

代码示例

代码示例来源:origin: jersey/jersey

@Override
  public String getAuthenticationScheme() {
    return request.getAuthType();
  }
};

代码示例来源:origin: jphp-group/jphp

@Signature
public String authType() {
  return request.getAuthType();
}

代码示例来源:origin: sonian/elasticsearch-jetty

@Override
protected boolean checkWebResourcePermissions(String pathInContext, Request request, Response response, Object constraintInfo, UserIdentity userIdentity)
    throws IOException {
  if (constraintInfo == null) {
    return true;
  }
  RoleInfo roleInfo = (RoleInfo) constraintInfo;
  if (!roleInfo.isChecked()) {
    return true;
  }
  if (roleInfo.isAnyRole() && request.getAuthType() != null)
    return true;
  for (String role : roleInfo.getRoles()) {
    if (userIdentity.isUserInRole(role, null))
      return true;
  }
  return false;
}

代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9

/** 
 * @see org.eclipse.jetty.security.SecurityHandler#checkWebResourcePermissions(java.lang.String, org.eclipse.jetty.server.Request, org.eclipse.jetty.server.Response, java.lang.Object, org.eclipse.jetty.server.UserIdentity)
 */
@Override
protected boolean checkWebResourcePermissions(String pathInContext, Request request, Response response, Object constraintInfo, UserIdentity userIdentity)
    throws IOException
{
  if (constraintInfo == null)
  {
    return true;
  }
  RoleInfo roleInfo = (RoleInfo)constraintInfo;
  if (!roleInfo.isChecked())
  {
    return true;
  }
  if (roleInfo.isAnyRole() && request.getAuthType()!=null)
    return true;
  for (String role : roleInfo.getRoles())
  {
    if (userIdentity.isUserInRole(role, null))
      return true;
  }
  return false;
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9

/** 
 * @see org.eclipse.jetty.security.SecurityHandler#checkWebResourcePermissions(java.lang.String, org.eclipse.jetty.server.Request, org.eclipse.jetty.server.Response, java.lang.Object, org.eclipse.jetty.server.UserIdentity)
 */
@Override
protected boolean checkWebResourcePermissions(String pathInContext, Request request, Response response, Object constraintInfo, UserIdentity userIdentity)
    throws IOException
{
  if (constraintInfo == null)
  {
    return true;
  }
  RoleInfo roleInfo = (RoleInfo)constraintInfo;
  if (!roleInfo.isChecked())
  {
    return true;
  }
  if (roleInfo.isAnyRole() && request.getAuthType()!=null)
    return true;
  for (String role : roleInfo.getRoles())
  {
    if (userIdentity.isUserInRole(role, null))
      return true;
  }
  return false;
}

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-webapp

/** 
 * @see org.eclipse.jetty.security.SecurityHandler#checkWebResourcePermissions(java.lang.String, org.eclipse.jetty.server.Request, org.eclipse.jetty.server.Response, java.lang.Object, org.eclipse.jetty.server.UserIdentity)
 */
@Override
protected boolean checkWebResourcePermissions(String pathInContext, Request request, Response response, Object constraintInfo, UserIdentity userIdentity)
    throws IOException
{
  if (constraintInfo == null)
  {
    return true;
  }
  RoleInfo roleInfo = (RoleInfo)constraintInfo;
  if (!roleInfo.isChecked())
  {
    return true;
  }
  if (roleInfo.isAnyRole() && request.getAuthType()!=null)
    return true;
  for (String role : roleInfo.getRoles())
  {
    if (userIdentity.isUserInRole(role, null))
      return true;
  }
  return false;
}

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-plus

/** 
 * @see org.eclipse.jetty.security.SecurityHandler#checkWebResourcePermissions(java.lang.String, org.eclipse.jetty.server.Request, org.eclipse.jetty.server.Response, java.lang.Object, org.eclipse.jetty.server.UserIdentity)
 */
@Override
protected boolean checkWebResourcePermissions(String pathInContext, Request request, Response response, Object constraintInfo, UserIdentity userIdentity)
    throws IOException
{
  if (constraintInfo == null)
  {
    return true;
  }
  RoleInfo roleInfo = (RoleInfo)constraintInfo;
  if (!roleInfo.isChecked())
  {
    return true;
  }
  if (roleInfo.isAnyRole() && request.getAuthType()!=null)
    return true;
  for (String role : roleInfo.getRoles())
  {
    if (userIdentity.isUserInRole(role, null))
      return true;
  }
  return false;
}

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server

/** 
 * @see org.eclipse.jetty.security.SecurityHandler#checkWebResourcePermissions(java.lang.String, org.eclipse.jetty.server.Request, org.eclipse.jetty.server.Response, java.lang.Object, org.eclipse.jetty.server.UserIdentity)
 */
@Override
protected boolean checkWebResourcePermissions(String pathInContext, Request request, Response response, Object constraintInfo, UserIdentity userIdentity)
    throws IOException
{
  if (constraintInfo == null)
  {
    return true;
  }
  RoleInfo roleInfo = (RoleInfo)constraintInfo;
  if (!roleInfo.isChecked())
  {
    return true;
  }
  if (roleInfo.isAnyRole() && request.getAuthType()!=null)
    return true;
  for (String role : roleInfo.getRoles())
  {
    if (userIdentity.isUserInRole(role, null))
      return true;
  }
  return false;
}

代码示例来源:origin: org.eclipse.jetty/security

/** 
 * @see org.eclipse.jetty.security.SecurityHandler#checkWebResourcePermissions(java.lang.String, org.eclipse.jetty.server.Request, org.eclipse.jetty.server.Response, java.lang.Object, org.eclipse.jetty.server.UserIdentity)
 */
@Override
protected boolean checkWebResourcePermissions(String pathInContext, Request request, Response response, Object constraintInfo, UserIdentity userIdentity)
    throws IOException
{
  if (constraintInfo == null)
  {
    return true;
  }
  RoleInfo roleInfo = (RoleInfo)constraintInfo;
  if (!roleInfo.isChecked())
  {
    return true;
  }
  if (roleInfo.isAnyRole() && request.getAuthType()!=null)
    return true;
  for (String role : roleInfo.getRoles())
  {
    if (userIdentity.isUserInRole(role, null))
      return true;
  }
  return false;
}

相关文章

Request类方法