Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/security/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Security JBOSS 7中的Weblogic Authenticate.Authenticate等效项_Security_Authentication_Login_Jboss_Weblogic - Fatal编程技术网

Security JBOSS 7中的Weblogic Authenticate.Authenticate等效项

Security JBOSS 7中的Weblogic Authenticate.Authenticate等效项,security,authentication,login,jboss,weblogic,Security,Authentication,Login,Jboss,Weblogic,JBoss7中Weblogic的登录安全模块代码的等效代码是什么 WebLogic提供专有的ServletAuthentication类来执行编程登录。在JBossAS7中,您可以使用标准JavaEE6Servlet3.0HttpServletRequest.login()方法执行编程登录,也可以在web.xml文件中定义元素 要启用编程登录,必须用以下代码之一替换WebLogic专有代码: 您可以向执行身份验证的Servlet类添加以下注释 // Imports for annotation

JBoss7中Weblogic的登录安全模块代码的等效代码是什么

WebLogic提供专有的ServletAuthentication类来执行编程登录。在JBossAS7中,您可以使用标准JavaEE6Servlet3.0
HttpServletRequest.login()
方法执行编程登录,也可以在
web.xml
文件中定义元素

要启用编程登录,必须用以下代码之一替换WebLogic专有代码:

  • 您可以向执行身份验证的Servlet类添加以下注释

    // Imports for annotations
    import javax.annotation.security.DeclareRoles;
    import javax.servlet.annotation.WebServlet;
    import javax.servlet.annotation.HttpConstraint;
    import javax.servlet.annotation.ServletSecurity;
    
    @WebServlet("/securedUrlPattern")
    @ServletSecurity(@HttpConstraint(rolesAllowed = { "myRole" }))
    @DeclareRoles("myRole")
    public class SecuredServlet extends HttpServlet {
      //Rest of code
    }
    

  • 如果您不想使用标准servlet,可以将包含虚拟URL模式的元素添加到
    web.xml
    文件中。这将通知JBoss创建默认身份验证器。未能在
    web.xml
    文件中创建元素可能会导致错误消息“没有可用于编程登录的身份验证程序”

我们应该

的另一个原因是,您应该告诉我们您对Weblo的
Authenticate.Authenticate()以及您试图使用JBOSS做什么的了解