protected Principal getSubjectPrincipal() { if (subjectInteraction == null) { Class<?> clazz = loadClass(getClass(), subjectInteractionClassName); try { subjectInteraction = (SubjectSecurityInteraction) clazz.newInstance(); subjectInteraction.setSecurityDomain(context.getRealm().getContainer().getName()); } catch (Exception e) { throw new RuntimeException(e); } } Subject subject = subjectInteraction.get(); if (subject != null) { Set<Principal> principals = subject.getPrincipals(); if (!principals.isEmpty()) { return subject.getPrincipals().iterator().next(); } } return null; }
doRegister(request, response, principal, password); if (originalPrincipal != null && needSubjectPrincipalSubstitution) { subjectInteraction.cleanup(originalPrincipal);
doRegister(request, response, principal, password); if (originalPrincipal != null && needSubjectPrincipalSubstitution) { subjectInteraction.cleanup(originalPrincipal);
protected Principal getSubjectPrincipal() { if (subjectInteraction == null) { Class<?> clazz = loadClass(getClass(), subjectInteractionClassName); try { subjectInteraction = (SubjectSecurityInteraction) clazz.newInstance(); subjectInteraction.setSecurityDomain(context.getRealm().getContainer().getName()); } catch (Exception e) { throw new RuntimeException(e); } } Subject subject = subjectInteraction.get(); if (subject != null) { Set<Principal> principals = subject.getPrincipals(); if (!principals.isEmpty()) { return subject.getPrincipals().iterator().next(); } } return null; }
doRegister(request, response, principal, password); if (originalPrincipal != null && needSubjectPrincipalSubstitution) { subjectInteraction.cleanup(originalPrincipal);
protected Principal getSubjectPrincipal() { if (subjectInteraction == null) { Class<?> clazz = loadClass(getClass(), subjectInteractionClassName); try { subjectInteraction = (SubjectSecurityInteraction) clazz.newInstance(); subjectInteraction.setSecurityDomain(context.getRealm().getContainer().getName()); } catch (Exception e) { throw new RuntimeException(e); } } Subject subject = subjectInteraction.get(); if (subject != null) { Set<Principal> principals = subject.getPrincipals(); if (!principals.isEmpty()) { return subject.getPrincipals().iterator().next(); } } return null; }