org.apache.catalina.Context.getAuthenticator()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(6.8k)|赞(0)|评价(0)|浏览(83)

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

Context.getAuthenticator介绍

[英]Obtain the Authenticator that is used by this context or null if none is used.
[中]获取此上下文使用的身份验证器,如果未使用身份验证器,则获取null

代码示例

代码示例来源:origin: codefollower/Tomcat-Research

/**
 * {@inheritDoc}
 */
@Override
public void logout() throws ServletException {
  context.getAuthenticator().logout(this);
}

代码示例来源:origin: org.jboss.web/jbossweb

public boolean authenticate(HttpServletResponse response) throws IOException,
    ServletException {
  if (context != null && context.getAuthenticator() != null) {
    return context.getAuthenticator().authenticate(this, response);
  } else {
    throw new ServletException(MESSAGES.noAuthenticator());
  }
}

代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina

/**
 * {@inheritDoc}
 */
@Override
public void logout() throws ServletException {
  context.getAuthenticator().logout(this);
}

代码示例来源:origin: jboss.web/jbossweb

public boolean authenticate(HttpServletResponse response) throws IOException,
    ServletException {
  if (context != null && context.getAuthenticator() != null) {
    return context.getAuthenticator().authenticate(this, response);
  } else {
    throw new ServletException(sm.getString("coyoteRequest.noAuthenticator"));
  }
}

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

/**
 * {@inheritDoc}
 */
@Override
public void logout() throws ServletException {
  context.getAuthenticator().logout(this);
}

代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina

/**
 * {@inheritDoc}
 */
@Override
public void logout() throws ServletException {
  context.getAuthenticator().logout(this);
}

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

/**
 * {@inheritDoc}
 */
@Override
public void logout() throws ServletException {
  context.getAuthenticator().logout(this);
}

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

/**
 * {@inheritDoc}
 */
@Override
public void logout() throws ServletException {
  context.getAuthenticator().logout(this);
}

代码示例来源:origin: org.jboss.web/jbossweb

public void login(String username, String password) throws ServletException {
  if (userPrincipal != null) {
    throw new ServletException(MESSAGES.authenticationFailure());
  }
  if (context != null && context.getAuthenticator() != null) {
    context.getAuthenticator().login(this, username, password);
  } else {
    throw new ServletException(MESSAGES.noAuthenticator());
  }
  if (userPrincipal == null) {
    throw new ServletException(MESSAGES.authenticationFailure());
  }
}

代码示例来源:origin: jboss.web/jbossweb

public void login(String username, String password) throws ServletException {
  if (userPrincipal != null) {
    throw new ServletException(sm.getString("coyoteRequest.authFailed"));
  }
  if (context != null && context.getAuthenticator() != null) {
    context.getAuthenticator().login(this, username, password);
  } else {
    throw new ServletException(sm.getString("coyoteRequest.noAuthenticator"));
  }
  if (userPrincipal == null) {
    throw new ServletException(sm.getString("coyoteRequest.authFailed"));
  }
}

代码示例来源:origin: codefollower/Tomcat-Research

/**
 * @throws IOException If an I/O error occurs
 * @throws IllegalStateException If the response has been committed
 * @throws ServletException If the caller is responsible for handling the
 *         error and the container has NOT set the HTTP response code etc.
 */
@Override
public boolean authenticate(HttpServletResponse response)
throws IOException, ServletException {
  if (response.isCommitted()) {
    throw new IllegalStateException(
        sm.getString("coyoteRequest.authenticate.ise"));
  }
  return context.getAuthenticator().authenticate(this, response);
}

代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina

/**
 * @throws IOException If an I/O error occurs
 * @throws IllegalStateException If the response has been committed
 * @throws ServletException If the caller is responsible for handling the
 *         error and the container has NOT set the HTTP response code etc.
 */
@Override
public boolean authenticate(HttpServletResponse response)
throws IOException, ServletException {
  if (response.isCommitted()) {
    throw new IllegalStateException(
        sm.getString("coyoteRequest.authenticate.ise"));
  }
  return context.getAuthenticator().authenticate(this, response);
}

代码示例来源:origin: org.apache.tomcat/tomcat-catalina

/**
 * {@inheritDoc}
 */
@Override
public void logout() throws ServletException {
  getContext().getAuthenticator().logout(this);
}

代码示例来源:origin: org.apache.tomcat/tomcat-catalina

/**
 * {@inheritDoc}
 */
@Override
public boolean authenticate(HttpServletResponse response)
throws IOException, ServletException {
  if (response.isCommitted()) {
    throw new IllegalStateException(
        sm.getString("coyoteRequest.authenticate.ise"));
  }
  return getContext().getAuthenticator().authenticate(this, response);
}

代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

/**
 * {@inheritDoc}
 */
@Override
public void logout() throws ServletException {
  getContext().getAuthenticator().logout(this);
}

代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

/**
 * {@inheritDoc}
 */
@Override
public boolean authenticate(HttpServletResponse response)
throws IOException, ServletException {
  if (response.isCommitted()) {
    throw new IllegalStateException(
        sm.getString("coyoteRequest.authenticate.ise"));
  }
  return getContext().getAuthenticator().authenticate(this, response);
}

代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina

/**
 * {@inheritDoc}
 */
@Override
public void login(String username, String password)
throws ServletException {
  if (getAuthType() != null || getRemoteUser() != null ||
      getUserPrincipal() != null) {
    throw new ServletException(
        sm.getString("coyoteRequest.alreadyAuthenticated"));
  }
  if (context.getAuthenticator() == null) {
    throw new ServletException("no authenticator");
  }
  context.getAuthenticator().login(username, password, this);
}

代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina

/**
 * {@inheritDoc}
 */
@Override
public void login(String username, String password)
throws ServletException {
  if (getAuthType() != null || getRemoteUser() != null ||
      getUserPrincipal() != null) {
    throw new ServletException(
        sm.getString("coyoteRequest.alreadyAuthenticated"));
  }
  if (context.getAuthenticator() == null) {
    throw new ServletException("no authenticator");
  }
  context.getAuthenticator().login(username, password, this);
}

代码示例来源:origin: org.apache.tomcat/tomcat-catalina

/**
 * {@inheritDoc}
 */
@Override
public void login(String username, String password)
throws ServletException {
  if (getAuthType() != null || getRemoteUser() != null ||
      getUserPrincipal() != null) {
    throw new ServletException(
        sm.getString("coyoteRequest.alreadyAuthenticated"));
  }
  getContext().getAuthenticator().login(username, password, this);
}

代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

/**
 * {@inheritDoc}
 */
@Override
public void login(String username, String password)
throws ServletException {
  if (getAuthType() != null || getRemoteUser() != null ||
      getUserPrincipal() != null) {
    throw new ServletException(
        sm.getString("coyoteRequest.alreadyAuthenticated"));
  }
  getContext().getAuthenticator().login(username, password, this);
}

相关文章

微信公众号

最新文章

更多

Context类方法