Package org.apache.catalina.realm

Examples of org.apache.catalina.realm.JAASRealm


     */
    public String createJAASRealm(String parent,String appName,String userClassNames,String roleClassNames,String useContextClassLoader)
        throws Exception {

         // Create a new JAASRealm instance
        JAASRealm realm = new JAASRealm();
        realm.setUserClassNames(userClassNames);
        realm.setRoleClassNames(roleClassNames);
        if("true".equals(useContextClassLoader) ||
                "TRUE".equals(useContextClassLoader)){
            realm.setUseContextClassLoader(true);
        } else {
            realm.setUseContextClassLoader(false);
        }
        // Add the new instance to its parent component
        ObjectName pname = new ObjectName(parent);
        ContainerBase containerBase = getParentContainerFromParent(pname);
        // Add the new instance to its parent component
        containerBase.setRealm(realm);
        // Return the corresponding MBean name
        ObjectName oname = realm.getObjectName();

        if (oname != null) {
            return (oname.toString());
        } else {
            return null;
View Full Code Here


    public Realm getRealm() {
        Realm configured=super.getRealm();
        // If no set realm has been called - default to JAAS
        // This can be overriden at engine, context and host level 
        if( configured==null ) {
            configured=new JAASRealm();
            this.setRealm( configured );
        }
        return configured;
    }
View Full Code Here

    public Realm getRealm() {
        Realm configured=super.getRealm();
        // If no set realm has been called - default to JAAS
        // This can be overriden at engine, context and host level 
        if( configured==null ) {
            configured=new JAASRealm();
            this.setRealm( configured );
        }
        return configured;
    }
View Full Code Here

    public Realm getRealm() {
        Realm configured=super.getRealm();
        // If no set realm has been called - default to JAAS
        // This can be overridden at engine, context and host level 
        if( configured==null ) {
            configured=new JAASRealm();
            this.setRealm( configured );
        }
        return configured;
    }
View Full Code Here

        check(aspectedResult);
    }

    public void testRealmStore() throws Exception {
        standardContext.setManager(new StandardManager());
        JAASRealm realm = new JAASRealm();
        standardContext.setRealm(realm);
        String aspectedResult = "<Context" + LF.LINE_SEPARATOR
                + "    docBase=\"myapps\"" + LF.LINE_SEPARATOR
                + "    path=\"/myapps\">" + LF.LINE_SEPARATOR
                + "  <Realm className=\"org.apache.catalina.realm.JAASRealm\""
View Full Code Here

    public void testElements() throws Exception {
        standardHost
                .addLifecycleListener(new org.apache.catalina.storeconfig.InfoLifecycleListener());
        standardHost
                .addLifecycleListener(new org.apache.catalina.startup.HostConfig());
        standardHost.setRealm(new JAASRealm());
        StandardContext context = new StandardContext();
        context.setDocBase("myapps");
        context.setPath("/myapps");
        standardHost.addChild(context);
        standardHost.addAlias("jovi");
View Full Code Here

    public void testElements() throws Exception {
        standardHost
                .addLifecycleListener(new org.apache.catalina.storeconfig.InfoLifecycleListener());
        standardHost
                .addLifecycleListener(new org.apache.catalina.startup.HostConfig());
        standardHost.setRealm(new JAASRealm());
        StandardContext context = new StandardContext();
        context.setDocBase("myapps");
        context.setPath("/myapps");
        standardHost.addChild(context);
        standardHost.addAlias("jovi");
View Full Code Here

        check(aspectedResult);
    }

    public void testRealmStore() throws Exception {
        standardContext.setManager(new StandardManager());
        JAASRealm realm = new JAASRealm();
        standardContext.setRealm(realm);
        String aspectedResult = "<Context" + LF.LINE_SEPARATOR
                + "    docBase=\"myapps\"" + LF.LINE_SEPARATOR
                + "    path=\"/myapps\">" + LF.LINE_SEPARATOR
                + "  <Realm className=\"org.apache.catalina.realm.JAASRealm\""
View Full Code Here

    public Realm getRealm() {
        Realm configured=super.getRealm();
        // If no set realm has been called - default to JAAS
        // This can be overriden at engine, context and host level 
        if( configured==null ) {
            configured=new JAASRealm();
            this.setRealm( configured );
        }
        return configured;
    }
View Full Code Here

    public Realm getRealm() {
        Realm configured=super.getRealm();
        // If no set realm has been called - default to JAAS
        // This can be overriden at engine, context and host level 
        if( configured==null ) {
            configured=new JAASRealm();
            this.setRealm( configured );
        }
        return configured;
    }
View Full Code Here

TOP

Related Classes of org.apache.catalina.realm.JAASRealm

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.