@Override public boolean processLogin(SecurityRequestWrapper request, HttpServletResponse response) throws Exception { return processLogin(request, response, null); }
/** * {@inheritDoc} * * @see com.xpn.xwiki.user.api.XWikiGroupService#countAllMatchedUsers(java.lang.Object[][], * com.xpn.xwiki.XWikiContext) */ public int countAllMatchedUsers(Object[][] matchFields, XWikiContext context) throws XWikiException { return countAllMatchedUsersOrGroups(true, matchFields, context); }
/** * {@inheritDoc} * * @see com.xpn.xwiki.user.impl.xwiki.XWikiAuthServiceImpl#checkAuth(java.lang.String, java.lang.String, * java.lang.String, com.xpn.xwiki.XWikiContext) */ @Override public XWikiUser checkAuth(String username, String password, String rememberme, XWikiContext context) throws XWikiException { return this.checkAuth(context); }
public Principal authenticate(String username, String password, XWikiContext context) throws XWikiException { XWikiAuthService authservice = getAuthService(context); if (authservice == null) return super.authenticate(username, password, context); else { try { return authservice.authenticate(username, password, context); } catch (Exception e) { return super.authenticate(username, password, context); } } }
public XWikiUser checkAuth(XWikiContext context) throws XWikiException { XWikiAuthService authservice = getAuthService(context); if (authservice == null) return super.checkAuth(context); else { try { return authservice.checkAuth(context); } catch (Exception e) { return super.checkAuth(context); } } }
public void showLogin(XWikiContext context) throws XWikiException { XWikiAuthService authservice = getAuthService(context); if (authservice == null) super.showLogin(context); else { try { authservice.showLogin(context); } catch (Exception e) { super.showLogin(context); } } }
public boolean processLogin(SecurityRequestWrapper request, HttpServletResponse response, XWikiContext context) throws Exception { Principal principal = checkLogin(request, response, context); if (principal == null) { // login failed // show the basic authentication window again. showLogin(request.getCurrentRequest(), response); return true; } return false; }
public void showLogin(XWikiContext context) throws XWikiException { try { if (context.getMode() == XWikiContext.MODE_SERVLET) { getAuthenticator(context).showLogin(context.getRequest().getHttpServletRequest(), context.getResponse().getHttpServletResponse(), context); } } catch (IOException e) { LOG.error("Unknown failure when calling showLogin", e); } }
/** * {@inheritDoc} * * @see com.xpn.xwiki.user.api.XWikiGroupService#getAllMatchedUsers(java.lang.Object[][], boolean, int, int, * java.lang.Object[][], com.xpn.xwiki.XWikiContext) */ public List< ? > getAllMatchedUsers(Object[][] matchFields, boolean withdetails, int nb, int start, Object[][] order, XWikiContext context) throws XWikiException { return getAllMatchedUsersOrGroups(true, matchFields, withdetails, nb, start, order, context); }
/** * {@inheritDoc} * * @see com.xpn.xwiki.user.api.XWikiGroupService#listGroupsForUser(java.lang.String, com.xpn.xwiki.XWikiContext) */ public Collection<String> listGroupsForUser(String member, XWikiContext context) throws XWikiException { return getAllGroupsNamesForMember(member, -1, 0, context); }
/** * {@inheritDoc} * * @see com.xpn.xwiki.user.api.XWikiGroupService#getAllMembersNamesForGroup(java.lang.String, int, int, * com.xpn.xwiki.XWikiContext) */ public Collection<String> getAllMembersNamesForGroup(String group, int nb, int start, XWikiContext context) throws XWikiException { return getAllMatchedMembersNamesForGroup(group, null, nb, start, null, context); }
/** * {@inheritDoc} * * @see org.securityfilter.authenticator.FormAuthenticator#processLogin(org.securityfilter.filter.SecurityRequestWrapper, * javax.servlet.http.HttpServletResponse) */ @Override public boolean processLogin(SecurityRequestWrapper request, HttpServletResponse response) throws Exception { return processLogin(request, response, null); }
public void showLogin(HttpServletRequest request, HttpServletResponse response, XWikiContext context) throws IOException { showLogin(request, response, realmName); } }
/** * {@inheritDoc} * * @see com.xpn.xwiki.user.api.XWikiRightService#hasAccessLevel(java.lang.String, java.lang.String, * java.lang.String, com.xpn.xwiki.XWikiContext) */ public boolean hasAccessLevel(String right, String username, String docname, XWikiContext context) throws XWikiException { try { return hasAccessLevel(right, username, docname, true, context); } catch (XWikiException e) { return false; } }
/** * {@inheritDoc} * * @see com.xpn.xwiki.user.api.XWikiGroupService#countAllMembersNamesForGroup(java.lang.String, * com.xpn.xwiki.XWikiContext) */ public int countAllMembersNamesForGroup(String group, XWikiContext context) throws XWikiException { if (group == null) { return 0; } // TODO: improve using real request return getAllMembersNamesForGroup(group, 0, 0, context).size(); } }
public boolean hasProgrammingRights(XWikiContext context) { // Once dropPermissions has been called, the document in the // context cannot have programming permission. if (context.hasDroppedPermissions()) { return false; } XWikiDocument sdoc = (XWikiDocument) context.get("sdoc"); if (sdoc == null) { sdoc = context.getDoc(); } return hasProgrammingRights(sdoc, context); }
public XWikiUser checkAuth(String username, String password, String rememberme, XWikiContext context) throws XWikiException { XWikiAuthService authservice = getAuthService(context); if (authservice == null) return super.checkAuth(username, password, rememberme, context); else { try { return authservice.checkAuth(username, password, rememberme, context); } catch (Exception e) { return super.checkAuth(username, password, rememberme, context); } } }
/** * {@inheritDoc} * * @see com.xpn.xwiki.user.api.XWikiGroupService#countAllMatchedGroups(java.lang.Object[][], * com.xpn.xwiki.XWikiContext) */ public int countAllMatchedGroups(Object[][] matchFields, XWikiContext context) throws XWikiException { return countAllMatchedUsersOrGroups(false, matchFields, context); }
/** * {@inheritDoc} * * @see com.xpn.xwiki.user.api.XWikiGroupService#getAllMatchedGroups(java.lang.Object[][], boolean, int, int, * java.lang.Object[][], com.xpn.xwiki.XWikiContext) */ public List< ? > getAllMatchedGroups(Object[][] matchFields, boolean withdetails, int nb, int start, Object[][] order, XWikiContext context) throws XWikiException { return getAllMatchedUsersOrGroups(false, matchFields, withdetails, nb, start, order, context); }
/** * {@inheritDoc} * * @see com.xpn.xwiki.user.api.XWikiGroupService#countAllGroupsNamesForMember(java.lang.String, * com.xpn.xwiki.XWikiContext) */ public int countAllGroupsNamesForMember(String member, XWikiContext context) throws XWikiException { if (member == null) { return 0; } // TODO: improve using real request return getAllGroupsNamesForMember(member, 0, 0, context).size(); }