org.apache.catalina.authenticator.AuthenticatorBase.reauthenticateFromSSO()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(2.6k)|赞(0)|评价(0)|浏览(138)

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

AuthenticatorBase.reauthenticateFromSSO介绍

[英]Attempts reauthentication to the Realm using the credentials included in argument entry.
[中]尝试使用参数entry中包含的凭据对Realm进行重新身份验证。

代码示例

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

public void login(Request request, String username, String password)
  throws ServletException {
  
  // Is there an SSO session against which we can try to reauthenticate?
  String ssoId = (String) request.getNote(Constants.REQ_SSOID_NOTE);
  if (ssoId != null) {
    if (log.isDebugEnabled())
      log.debug("SSO Id " + ssoId + " set; attempting " +
           "reauthentication");
    /* Try to reauthenticate using data cached by SSO.  If this fails,
      either the original SSO logon was of DIGEST or SSL (which
      we can't reauthenticate ourselves because there is no
      cached username and password), or the realm denied
      the user's reauthentication for some reason.
      In either case we have to prompt the user for a logon */
    if (reauthenticateFromSSO(ssoId, request))
      return;
  }
  Realm realm = context.getRealm();
  Principal principal = realm.authenticate(username, password);
  if (principal != null) {
    register(request, request.getResponseFacade(), principal, Constants.LOGIN_METHOD,
         username, password);
  }
}

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

public void login(Request request, String username, String password)
  throws ServletException {
  
  // Is there an SSO session against which we can try to reauthenticate?
  String ssoId = (String) request.getNote(Constants.REQ_SSOID_NOTE);
  if (ssoId != null) {
    if (CatalinaLogger.AUTH_LOGGER.isDebugEnabled())
      CatalinaLogger.AUTH_LOGGER.debug("SSO Id " + ssoId + " set; attempting " +
           "reauthentication");
    /* Try to reauthenticate using data cached by SSO.  If this fails,
      either the original SSO logon was of DIGEST or SSL (which
      we can't reauthenticate ourselves because there is no
      cached username and password), or the realm denied
      the user's reauthentication for some reason.
      In either case we have to prompt the user for a logon */
    if (reauthenticateFromSSO(ssoId, request))
      return;
  }
  Realm realm = context.getRealm();
  Principal principal = realm.authenticate(username, password);
  if (principal != null) {
    register(request, request.getResponseFacade(), principal, Constants.LOGIN_METHOD,
         username, password);
  }
}

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

if (reauthenticateFromSSO(ssoId, request)) {
  return true;

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

if (reauthenticateFromSSO(ssoId, request)) {
  return true;

相关文章

微信公众号

最新文章

更多