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 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); } } }
@Override public XWikiUser checkAuth(XWikiContext context) throws XWikiException { String user = context.getRequest().getRemoteUser(); if ((user == null) || user.equals("")) { return super.checkAuth(context); } else { if (log.isDebugEnabled()) log.debug("Launching create user for " + user); createUser(user, context); if (log.isDebugEnabled()) log.debug("Create user done for " + user); user = "XWiki." + user; } context.setUser(user); return new XWikiUser(user); }
/** * {@inheritDoc} * * @see com.xpn.xwiki.user.impl.xwiki.XWikiAuthServiceImpl#checkAuth(com.xpn.xwiki.XWikiContext) */ @Override public XWikiUser checkAuth(XWikiContext context) throws XWikiException { String user = context.getRequest().getRemoteUser(); LOG.debug(MessageFormat.format("Checking auth for remote user {0}", user)); if (StringUtils.isBlank(user)) { return super.checkAuth(context); } else { user = this.extractUsernameFromPrincipal(user); user = createUser(user, context); user = XWIKI_SPACE + DOT + user; } context.setUser(user); return new XWikiUser(user); }
/** * We cannot authenticate locally since we need to trust the app server for authentication. */ @Override public XWikiUser checkAuth(String username, String password, String rememberme, XWikiContext context) throws XWikiException { String user = context.getRequest().getRemoteUser(); if ((user == null) || user.equals("")) { return super.checkAuth(username, password, rememberme, context); } else { createUser(user, context); user = "XWiki." + user; } context.setUser(user); return new XWikiUser(user); } }