Package com.sun.enterprise.security

Examples of com.sun.enterprise.security.PrincipalGroupFactory


            if (!_succeeded) {
                _commitSucceeded = false;
                return false;
            }

            PrincipalGroupFactory factory = Globals.getDefaultHabitat().getService(PrincipalGroupFactory.class);
            _userPrincipal = factory.getPrincipalInstance(digestCredentials.getUserName(), digestCredentials.getRealmName());
            java.util.Set principalSet = this.subject.getPrincipals();
            if (!principalSet.contains(_userPrincipal)) {
                principalSet.add(_userPrincipal);
            }
            java.util.Enumeration groupsList = getGroups(digestCredentials.getUserName());
            while (groupsList.hasMoreElements()) {
                java.lang.String value = (java.lang.String) groupsList.nextElement();
                Group g = factory.getGroupInstance(value, digestCredentials.getRealmName());
                if (!principalSet.contains(g)) {
                    principalSet.add(g);
                }
                // cleaning the slate
            }
View Full Code Here


            if (!_succeeded) {
                _commitSucceeded = false;
                return false;
            }

            PrincipalGroupFactory factory = Globals.getDefaultHabitat().getService(PrincipalGroupFactory.class);
            _userPrincipal = factory.getPrincipalInstance(digestCredentials.getUserName(), digestCredentials.getRealmName());
            java.util.Set principalSet = this.subject.getPrincipals();
            if (!principalSet.contains(_userPrincipal)) {
                principalSet.add(_userPrincipal);
            }
            java.util.Enumeration groupsList = getGroups(digestCredentials.getUserName());
            while (groupsList.hasMoreElements()) {
                java.lang.String value = (java.lang.String) groupsList.nextElement();
                Group g = factory.getGroupInstance(value, digestCredentials.getRealmName());
                if (!principalSet.contains(g)) {
                    principalSet.add(g);
                }
                // cleaning the slate
            }
View Full Code Here

        }

        // Add a Principal (authenticated identity) to the Subject
        // Assume the user we authenticated is the PrincipalImpl [RI]
        String realm_name = _currentRealm.getName();
        PrincipalGroupFactory factory = Globals.getDefaultHabitat().getService(PrincipalGroupFactory.class);
        if (factory != null)
            _userPrincipal =
                factory.getPrincipalInstance(getUsername(),realm_name);
        else
            _userPrincipal = new PrincipalImpl(getUsername());

        Set<Principal> principalSet = _subject.getPrincipals();
        if (!principalSet.contains(_userPrincipal)){
            principalSet.add(_userPrincipal);
        }
        /* populate the group in the subject and clean out the slate at the same
         * time
         */
        for(int i = 0; i<_groupsList.length; i++){
            if(_groupsList[i] != null){
                Group g;
                if (factory != null)
                    g = factory.getGroupInstance(_groupsList[i], realm_name);
                else
                    g = new Group(_groupsList[i]);

                if(!principalSet.contains(g)){
                    principalSet.add(g);
View Full Code Here

        }

        // Add a Principal (authenticated identity) to the Subject
        // Assume the user we authenticated is the PrincipalImpl [RI]
        String realm_name = _currentRealm.getName();
        PrincipalGroupFactory factory = Globals.getDefaultHabitat().getService(PrincipalGroupFactory.class);
        if (factory != null)
            _userPrincipal =
                factory.getPrincipalInstance(getUsername(),realm_name);
        else
            _userPrincipal = new PrincipalImpl(getUsername());

        Set<Principal> principalSet = _subject.getPrincipals();
        if (!principalSet.contains(_userPrincipal)){
            principalSet.add(_userPrincipal);
        }
        /* populate the group in the subject and clean out the slate at the same
         * time
         */
        for(int i = 0; i<_groupsList.length; i++){
            if(_groupsList[i] != null){
                Group g;
                if (factory != null)
                    g = factory.getGroupInstance(_groupsList[i], realm_name);
                else
                    g = new Group(_groupsList[i]);

                if(!principalSet.contains(g)){
                    principalSet.add(g);
View Full Code Here

        }

        // Add a Principal (authenticated identity) to the Subject
        // Assume the user we authenticated is the PrincipalImpl [RI]
        String realm_name = _currentRealm.getName();
        PrincipalGroupFactory factory = Globals.getDefaultHabitat().getService(PrincipalGroupFactory.class);
        if (factory != null)
            _userPrincipal =
                factory.getPrincipalInstance(getUsername(),realm_name);
        else
            _userPrincipal = new PrincipalImpl(getUsername());

        Set<Principal> principalSet = _subject.getPrincipals();
        if (!principalSet.contains(_userPrincipal)){
            principalSet.add(_userPrincipal);
        }
        /* populate the group in the subject and clean out the slate at the same
         * time
         */
        for(int i = 0; i<_groupsList.length; i++){
            if(_groupsList[i] != null){
                Group g;
                if (factory != null)
                    g = factory.getGroupInstance(_groupsList[i], realm_name);
                else
                    g = new Group(_groupsList[i]);

                if(!principalSet.contains(g)){
                    principalSet.add(g);
View Full Code Here

TOP

Related Classes of com.sun.enterprise.security.PrincipalGroupFactory

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.