gpt4 book ai didi

com.xpn.xwiki.user.api.XWikiAuthService.checkAuth()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-19 04:16:40 27 4
gpt4 key购买 nike

本文整理了Java中com.xpn.xwiki.user.api.XWikiAuthService.checkAuth()方法的一些代码示例,展示了XWikiAuthService.checkAuth()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XWikiAuthService.checkAuth()方法的具体详情如下:
包路径:com.xpn.xwiki.user.api.XWikiAuthService
类名称:XWikiAuthService
方法名:checkAuth

XWikiAuthService.checkAuth介绍

[英]Authenticates the user.
[中]验证用户的身份。

代码示例

代码示例来源:origin: com.xpn.xwiki.platform/xwiki-core

public XWikiUser checkAuth(XWikiContext context) throws XWikiException
{
  return getAuthService().checkAuth(context);
}

代码示例来源:origin: com.xpn.xwiki.platform/xwiki-core

/**
 * Check authentication from request and set according persitent login information If it fails user is unlogged
 * 
 * @return null if failed, non null XWikiUser if sucess
 * @throws XWikiException
 */
public XWikiUser checkAuth() throws XWikiException
{
  return this.context.getWiki().getAuthService().checkAuth(this.context);
}

代码示例来源:origin: com.xpn.xwiki.platform/xwiki-core

/**
 * Check authentication from username and password and set according persitent login information If it fails user is
 * unlogged
 * 
 * @param username username to check
 * @param password password to check
 * @param rememberme "1" if you want to remember the login accross navigator restart
 * @return null if failed, non null XWikiUser if sucess
 * @throws XWikiException
 */
public XWikiUser checkAuth(String username, String password, String rememberme) throws XWikiException
{
  return this.context.getWiki().getAuthService().checkAuth(username, password, rememberme, this.context);
}

代码示例来源:origin: com.xpn.xwiki.platform/xwiki-core

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);
    }
  }
}

代码示例来源:origin: com.xpn.xwiki.platform/xwiki-core

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);
    }
  }
}

代码示例来源:origin: org.xwiki.platform/xwiki-platform-gwt-api

@Override
public String login(String username, String password, boolean rememberme) throws XWikiGWTException
{
  try {
    XWikiContext context = getXWikiContext();
    XWikiUser user =
      context.getWiki().getAuthService().checkAuth(username, password, rememberme ? "yes" : "no", context);
    if (user == null)
      return "XWiki.XWikiGuest";
    else
      return user.getUser();
  } catch (Exception e) {
    throw getXWikiGWTException(e);
  }
}

代码示例来源:origin: com.xpn.xwiki.platform/xwiki-rest-server

XWikiUser xwikiUser = xwiki.getAuthService().checkAuth(xwikiContext);
if (xwikiUser != null) {

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com