private boolean isUsernameTokenEventAllowed(UsernameTokenSecurityEvent event, Message msg) { if (event == null) { return false; } boolean allowUTNoPassword = SecurityUtils.getSecurityPropertyBoolean( SecurityConstants.ENABLE_UT_NOPASSWORD_PRINCIPAL, msg, false ); // The "no password" case is not allowed by default return event.getSecurityToken() != null && (allowUTNoPassword || event.getSecurityToken().getPassword() != null); }
private boolean isUsernameTokenEventAllowed(UsernameTokenSecurityEvent event, Message msg) { if (event == null) { return false; } boolean allowUTNoPassword = SecurityUtils.getSecurityPropertyBoolean( SecurityConstants.ENABLE_UT_NOPASSWORD_PRINCIPAL, msg, false ); // The "no password" case is not allowed by default return event.getSecurityToken() != null && (allowUTNoPassword || event.getSecurityToken().getPassword() != null); }