subjectInfo.setAuthenticatedSubject(subject);
// TODO: remove this when fixed in JBoss - WORKAROUND to get authentication to propagate to EJBs SecurityContext oldContext = SecurityContextAssociation.getSecurityContext(); SubjectInfo subjectInfo = oldContext.getSubjectInfo(); subjectInfo.setAuthenticatedSubject(serviceSubject); SecurityContextAssociation.setPrincipal(degroofPrincipal); serviceSubject.getPrincipals().add(degroofPrincipal);
/** * Push the authenticated subject onto the security context * IMPORTANT - this needs to be done after the isValid call */ public void pushSubjectContext(Subject subject) { securityContext.getSubjectInfo().setAuthenticatedSubject(subject); } }
/** * Push the authenticated subject onto the security context * IMPORTANT - this needs to be done after the isValid call */ public void pushSubjectContext(Subject subject) { securityContext.getSubjectInfo().setAuthenticatedSubject(subject); } }
/** * Push the authenticated subject onto the security context * IMPORTANT - this needs to be done after the isValid call */ public void pushSubjectContext(Subject subject) { securityContext.getSubjectInfo().setAuthenticatedSubject(subject); } }
/** * {@inheritDoc} */ public void setAuthenticatedSubject(Subject subject) { delegator.getSubjectInfo().setAuthenticatedSubject(subject); }
securityContext.getSubjectInfo().setAuthenticatedSubject(unauthenticated);
subjectInfo.setAuthenticatedSubject(subject);
if(si != null) si.setAuthenticatedSubject(subject);
subjectInfo.setAuthenticatedSubject(subject);
subjectInfo.setAuthenticatedSubject(subject);
subject.getPrivateCredentials().addAll(currentSubject.getPrivateCredentials()); currentSC.getSubjectInfo().setAuthenticatedSubject(subject); subject.getPrivateCredentials().addAll(currentSubject.getPrivateCredentials()); currentSC.getSubjectInfo().setAuthenticatedSubject(subject); subject.getPrivateCredentials().addAll(currentSubject.getPrivateCredentials()); currentSC.getSubjectInfo().setAuthenticatedSubject(subject);