Examples of UserRealm


Examples of org.mortbay.http.UserRealm

            }
        } else {
            unauthenticated = true;
        }

        UserRealm realm = getRealm();
        Authenticator authenticator = getAuthenticator();
        Principal user = null;
        if (!unauthenticated && !forbidden) {
            if (realm == null) {
                log.warn("Realm Not Configured");
View Full Code Here

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

Examples of org.mortbay.jetty.security.UserRealm

        {
            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

Examples of org.mortbay.jetty.security.UserRealm

        // 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

Examples of org.mortbay.jetty.security.UserRealm

         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

Examples of org.mortbay.jetty.security.UserRealm

        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

Examples of org.mortbay.jetty.security.UserRealm

        {
            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

Examples of org.mortbay.jetty.security.UserRealm

        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

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

Examples of org.mortbay.jetty.security.UserRealm

        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
TOP
Copyright © 2018 www.massapi.com. 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.