@Override protected boolean authenticate(Request request, Response response, LoginConfig loginConfig) throws IOException { return super.performAuthentication(request, response, loginConfig); }
principal = getSubjectPrincipal(); if (principal == null) { throw new RuntimeException("Principal from subject is null"); session.setNote(Constants.SESS_PASSWORD_NOTE, password); request.setUserPrincipal(principal); doRegister(request, response, principal, password); if (originalPrincipal != null && needSubjectPrincipalSubstitution) { subjectInteraction.cleanup(originalPrincipal);
principal = getSubjectPrincipal(); if (principal == null) { throw new RuntimeException("Principal from subject is null"); session.setNote(Constants.SESS_PASSWORD_NOTE, password); request.setUserPrincipal(principal); doRegister(request, response, principal, password); if (originalPrincipal != null && needSubjectPrincipalSubstitution) { subjectInteraction.cleanup(originalPrincipal);
principal = getSubjectPrincipal(); if (principal == null) { throw new RuntimeException("Principal from subject is null"); session.setNote(Constants.SESS_PASSWORD_NOTE, password); request.setUserPrincipal(principal); doRegister(request, response, principal, password); if (originalPrincipal != null && needSubjectPrincipalSubstitution) { subjectInteraction.cleanup(originalPrincipal);
@Override protected boolean authenticate(Request request, HttpServletResponse response, LoginConfig config) throws IOException { return super.performAuthentication(request, (Response) response, config); }
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; }
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; }
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; }