Package org.apache.geronimo.security

Examples of org.apache.geronimo.security.SubjectId


        for (Iterator iterator = roleDesignates.entrySet().iterator(); iterator.hasNext();) {
            Map.Entry entry = (Map.Entry) iterator.next();
            Subject roleDesignate = (Subject) entry.getValue();
            ContextManager.registerSubject(roleDesignate);
            SubjectId id = ContextManager.getSubjectId(roleDesignate);
            roleDesignate.getPrincipals().add(new IdentificationPrincipal(id));
        }
        this.roleDesignates = roleDesignates;
    }
View Full Code Here


                 */
                DefaultPrincipal defaultPrincipal = securityHolder.getDefaultPrincipal();
                if (defaultPrincipal != null) {
                    defaultSubject = ConfigurationUtil.generateDefaultSubject(defaultPrincipal, ctx.getWebClassLoader());
                    ContextManager.registerSubject(defaultSubject);
                    SubjectId id = ContextManager.getSubjectId(defaultSubject);
                    defaultSubject.getPrincipals().add(new IdentificationPrincipal(id));
                }

                PolicyContextValve policyValve = new PolicyContextValve(securityHolder.getPolicyContextID());
                addValve(policyValve);
View Full Code Here

    public void uninstall(Set<String> contextIds) throws PolicyContextException {
    }

    private void registerSubject(Subject subject) {
        ContextManager.registerSubject(subject);
        SubjectId id = ContextManager.getSubjectId(subject);
        subject.getPrincipals().add(new IdentificationPrincipal(id));
    }
View Full Code Here

        }
    }

    private void registerSubject(Subject subject) {
        ContextManager.registerSubject(subject);
        SubjectId id = ContextManager.getSubjectId(subject);
        subject.getPrincipals().add(new IdentificationPrincipal(id));
    }
View Full Code Here

        /**
         * Register our default principal with the ContextManager
         */
        Subject defaultSubject = defaultPrincipal.getSubject();
        ContextManager.registerSubject(defaultSubject);
        SubjectId id = ContextManager.getSubjectId(defaultSubject);
        defaultSubject.getPrincipals().add(new IdentificationPrincipal(id));

        log.debug("Default subject " + id + " for JACC policy '" + ((JettyWebAppJACCContext) getHttpContext()).getPolicyContextID() + "' registered.");

        /**
 
View Full Code Here

        }
        subject.getPrincipals().addAll(principals);

        ContextManager.registerSubject(subject);

        SubjectId id = ContextManager.getSubjectId(lm.getSubject());

        subject.getPrincipals().add(new IdentificationPrincipal(id));

        return true;
    }
View Full Code Here

         */
        this.defaultPrincipal = generateDefaultPrincipal(defaultPrincipal, classLoader);

        Subject defaultSubject = this.defaultPrincipal.getSubject();
        ContextManager.registerSubject(defaultSubject);
        SubjectId id = ContextManager.getSubjectId(defaultSubject);
        defaultSubject.getPrincipals().add(new IdentificationPrincipal(id));
        setUserRealm(userRealm);
        this.realm = userRealm;
        assert realm != null;
    }
View Full Code Here

                    throw new GeronimoSecurityException("Unable to generate default principal");
                }

                defaultSubject = ConfigurationUtil.generateDefaultSubject(defaultPrincipal, ctx.getClassLoader());
                ContextManager.registerSubject(defaultSubject);
                SubjectId id = ContextManager.getSubjectId(defaultSubject);
                defaultSubject.getPrincipals().add(new IdentificationPrincipal(id));

                interceptor = new PolicyContextBeforeAfter(interceptor, index++, index++, index++, securityHolder.getPolicyContextID(), defaultSubject);

            }
View Full Code Here

     */
    private SubjectId extractSubjectId(Packet packet) throws IOException {
        DataInputStream is = new DataInputStream(new PacketInputStream(packet));
        Long id = new Long(is.readLong());
        byte hash[]new byte[ is.readInt() ];
        return new SubjectId(id, hash);
    }
View Full Code Here

        for (Iterator iterator = roleDesignates.entrySet().iterator(); iterator.hasNext();) {
            Map.Entry entry = (Map.Entry) iterator.next();
            Subject roleDesignate = (Subject) entry.getValue();
            ContextManager.registerSubject(roleDesignate);
            SubjectId id = ContextManager.getSubjectId(roleDesignate);
            roleDesignate.getPrincipals().add(new IdentificationPrincipal(id));
        }
        this.roleDesignates = roleDesignates;
    }
View Full Code Here

TOP

Related Classes of org.apache.geronimo.security.SubjectId

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.