- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中com.xpn.xwiki.user.api.XWikiAuthService.authenticate()
方法的一些代码示例,展示了XWikiAuthService.authenticate()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XWikiAuthService.authenticate()
方法的具体详情如下:
包路径:com.xpn.xwiki.user.api.XWikiAuthService
类名称:XWikiAuthService
方法名:authenticate
暂无
代码示例来源:origin: com.xpn.xwiki.platform/xwiki-core
public static Principal authenticate(String username, String password, XWikiContext context) throws XWikiException
{
return context.getWiki().getAuthService().authenticate(username, password, context);
}
代码示例来源:origin: com.xpn.xwiki.platform/xwiki-core
public static Principal authenticate(String username, String password, XWikiContext context) throws XWikiException
{
return context.getWiki().getAuthService().authenticate(username, password, context);
}
代码示例来源:origin: com.xpn.xwiki.platform/xwiki-core
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);
}
}
}
代码示例来源:origin: com.xpn.xwiki.platform/xwiki-rest-server
@Override
public boolean checkSecret(Request request, String identifier, char[] secret)
{
ComponentManager componentManager =
(ComponentManager) getContext().getAttributes().get(Constants.XWIKI_COMPONENT_MANAGER);
XWikiContext xwikiContext = Utils.getXWikiContext(componentManager);
XWiki xwiki = Utils.getXWiki(componentManager);
try {
Principal principal = xwiki.getAuthService().authenticate(identifier, new String(secret), xwikiContext);
if (principal != null) {
String xwikiUser = principal.getName();
xwikiContext.setUser(xwikiUser);
getLogger().log(Level.FINE, String.format("Authenticated as '%s'.", identifier));
return true;
}
} catch (XWikiException e) {
getLogger().log(Level.WARNING, "Exception occurred while authenticating.", e);
}
getLogger().log(Level.WARNING, String.format("Cannot authenticate '%s'.", identifier));
return false;
}
代码示例来源:origin: com.xpn.xwiki.platform/xwiki-core
/**
* Login.
*
* @return A token to be used in subsequent calls as an identification.
* @throws Exception If authentication fails.
*/
public String login(String userName, String password) throws Exception
{
String token;
Principal principal = this.xwiki.getAuthService().authenticate(userName, password, this.xwikiContext);
if (principal != null) {
// Generate "unique" token using a random number
token = this.xwiki.generateValidationKey(128);
String ip = this.xwikiContext.getRequest().getRemoteAddr();
XWikiUtils.getTokens(this.xwikiContext).put(token, new XWikiXmlRpcUser(principal.getName(), ip));
return token;
} else {
throw new Exception(String.format("[Authentication failed for user '%s']", userName));
}
}
代码示例来源:origin: org.phenotips/patient-data-sharing-receiver-api
String password = request.getParameter(ShareProtocol.CLIENT_POST_KEY_NAME_PASSWORD);
if (context.getWiki().getAuthService().authenticate(userName, password, context) == null) {
return generateFailedCredentialsResponse();
代码示例来源:origin: phenotips/phenotips
String password = request.getParameter(ShareProtocol.CLIENT_POST_KEY_NAME_PASSWORD);
if (context.getWiki().getAuthService().authenticate(userName, password, context) == null) {
return generateFailedCredentialsResponse();
本文整理了Java中com.xpn.xwiki.user.api.XWikiAuthService.showLogin()方法的一些代码示例,展示了XWikiAuthService.showLogin
本文整理了Java中com.xpn.xwiki.user.api.XWikiAuthService.authenticate()方法的一些代码示例,展示了XWikiAuthService.authen
本文整理了Java中com.xpn.xwiki.user.api.XWikiAuthService.checkAuth()方法的一些代码示例,展示了XWikiAuthService.checkAuth
我是一名优秀的程序员,十分优秀!