Package org.mortbay.jetty.security

Examples of org.mortbay.jetty.security.UserRealm


    protected void initLoginConfig(XmlParser.Node node)
    {
        // check if a realm has been explicitly set
        String realmName=null;
        UserRealm userRealm = getJBossWebApplicationContext().getSecurityHandler().getUserRealm();
        if (userRealm!= null)
            realmName=userRealm.getName();
       
        //use a security domain from jboss-web.xml
        if (null==realmName)
        {
            WebMetaData metaData = getJBossWebApplicationContext()._webApp.getMetaData();
View Full Code Here


        {
            SecurityHandler.NotChecked not_checked=(SecurityHandler.NotChecked)_userPrincipal;
            _userPrincipal = SecurityHandler.__NO_USER;
           
            Authenticator auth=not_checked.getSecurityHandler().getAuthenticator();
            UserRealm realm=not_checked.getSecurityHandler().getUserRealm();
            String pathInContext=getPathInfo()==null?getServletPath():(getServletPath()+getPathInfo());
           
            if (realm != null && auth != null)
            {
                try
View Full Code Here

        // Configures user realms
        Iterator realmsIterator = userRealms.iterator();
        while (realmsIterator.hasNext())
        {
            UserRealm realm = (UserRealm) realmsIterator.next();
            server.addUserRealm(realm);
        }

        // Does not cache resources, to prevent Windows from locking files
        Resource.setDefaultUseCaches(false);
View Full Code Here

         Connector connector = new SelectChannelConnector();

         connector.setPort(0);
         _server.setConnectors(new Connector[]{connector});

         UserRealm userRealm = new HashUserRealm("MyRealm", "src/test/resources/realm.properties");

         Constraint constraint = new Constraint();
         constraint.setName("Need User or Admin");
         constraint.setRoles(new String[]{"user", "admin"});
         constraint.setAuthenticate(true);
View Full Code Here

        connector.setKeyPassword("keypwd");

        _server.setConnectors(new Connector[]
        { connector });

        UserRealm userRealm = new HashUserRealm("MyRealm","src/test/resources/realm.properties");

        Constraint constraint = new Constraint();
        constraint.setName("Need User or Admin");
        constraint.setRoles(new String[]
        { "user", "admin" });
View Full Code Here

        {
            SecurityHandler.NotChecked not_checked=(SecurityHandler.NotChecked)_userPrincipal;
            _userPrincipal = SecurityHandler.__NO_USER;
           
            Authenticator auth=not_checked.getSecurityHandler().getAuthenticator();
            UserRealm realm=not_checked.getSecurityHandler().getUserRealm();
            String pathInContext=getPathInfo()==null?getServletPath():(getServletPath()+getPathInfo());
           
            if (realm != null && auth != null)
            {
                try
View Full Code Here

        UserRealm[] realms=ContextHandler.getCurrentContext().getContextHandler().getServer().getUserRealms();

        String realm_name=name==null?"default":name.toString(false,true);

        UserRealm realm=getWebAppContext().getSecurityHandler().getUserRealm();
        for (int i=0;realm==null && realms!=null && i<realms.length; i++)
        {
            if (realms[i]!=null && realm_name.equals(realms[i].getName()))
                realm=realms[i];
        }
View Full Code Here

    protected void initLoginConfig(XmlParser.Node node)
    {
        // check if a realm has been explicitly set
        String realmName=null;
        UserRealm userRealm = getJBossWebApplicationContext().getSecurityHandler().getUserRealm();
        if (userRealm!= null)
            realmName=userRealm.getName();
       
        //use a security domain from jboss-web.xml
        if (null==realmName)
        {
            WebMetaData metaData = getJBossWebApplicationContext()._webApp.getMetaData();
View Full Code Here

        UserRealm[] realms=ContextHandler.getCurrentContext().getContextHandler().getServer().getUserRealms();

        String realm_name=name==null?"default":name.toString(false,true);

        UserRealm realm=getWebAppContext().getSecurityHandler().getUserRealm();
        for (int i=0;realm==null && realms!=null && i<realms.length; i++)
        {
            if (realms[i]!=null && realm_name.equals(realms[i].getName()))
                realm=realms[i];
        }
View Full Code Here

        {
            SecurityHandler.NotChecked not_checked=(SecurityHandler.NotChecked)_userPrincipal;
            _userPrincipal = SecurityHandler.__NO_USER;
           
            Authenticator auth=not_checked.getSecurityHandler().getAuthenticator();
            UserRealm realm=not_checked.getSecurityHandler().getUserRealm();
            String pathInContext=getPathInfo()==null?getServletPath():(getServletPath()+getPathInfo());
           
            if (realm != null && auth != null)
            {
                try
View Full Code Here

TOP

Related Classes of org.mortbay.jetty.security.UserRealm

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.