Examples of SubjectId


Examples of org.apache.geronimo.security.SubjectId

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

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

Examples of org.apache.geronimo.security.SubjectId

    public boolean login() throws LoginException {
        return false;
    }

    public boolean commit() throws LoginException {
        SubjectId id = ContextManager.registerSubject(subject);
        IdentificationPrincipal principal = new IdentificationPrincipal(id);
        subject.getPrincipals().add(principal);
        return false;
    }
View Full Code Here

Examples of org.apache.geronimo.security.SubjectId

        }
    }

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

Examples of org.apache.geronimo.security.SubjectId

    public boolean login() throws LoginException {
        return false;
    }

    public boolean commit() throws LoginException {
        SubjectId id = ContextManager.registerSubject(subject);
        IdentificationPrincipal principal = new IdentificationPrincipal(id);
        subject.getPrincipals().add(principal);
        return false;
    }
View Full Code Here

Examples of org.apache.geronimo.security.SubjectId

    public Object login(String securityRealm, String user, String pass) throws LoginException {
        LoginContext context = new LoginContext(securityRealm, new UsernamePasswordCallbackHandler(user, pass));
        context.login();

        Subject subject = context.getSubject();
        SubjectId subjectId = ContextManager.registerSubject(subject);
        return subjectId;
    }
View Full Code Here

Examples of org.apache.geronimo.security.SubjectId

        }
    }

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

Examples of org.apache.geronimo.security.SubjectId

    public boolean login() throws LoginException {
        return true;
    }

    public boolean commit() throws LoginException {
        SubjectId id = ContextManager.registerSubject(subject);
        IdentificationPrincipal principal = new IdentificationPrincipal(id);
        subject.getPrincipals().add(principal);
        return true;
    }
View Full Code Here

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

Examples of org.apache.geronimo.security.SubjectId

            throw new ExpiredLoginModuleException();
        }

        Subject subject = session.getSubject();
        ContextManager.registerSubject(subject);
        SubjectId id = ContextManager.getSubjectId(subject);
        IdentificationPrincipal principal = new IdentificationPrincipal(id);
        subject.getPrincipals().add(principal);
        return principal;
    }
View Full Code Here

Examples of org.apache.geronimo.security.SubjectId

            if (principals.isEmpty()) {
                super.write(createClearSubjectPackt());
            } else {
                IdentificationPrincipal principal = (IdentificationPrincipal) principals.iterator().next();
                SubjectId subjectId = principal.getId();
                super.write(createSubjectPacket(subjectId.getSubjectId(), subjectId.getHash()));
            }

        }
        super.write(createPassthroughPacket(packet));
    }
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.