本文整理汇总了Java中org.jasig.cas.authentication.principal.PrincipalResolver.supports方法的典型用法代码示例。如果您正苦于以下问题:Java PrincipalResolver.supports方法的具体用法?Java PrincipalResolver.supports怎么用?Java PrincipalResolver.supports使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jasig.cas.authentication.principal.PrincipalResolver
的用法示例。
在下文中一共展示了PrincipalResolver.supports方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: resolvePrincipal
import org.jasig.cas.authentication.principal.PrincipalResolver; //导入方法依赖的package包/类
/**
* Resolve principal.
*
* @param handlerName the handler name
* @param resolver the resolver
* @param credential the credential
* @return the principal
*/
protected Principal resolvePrincipal(
final String handlerName, final PrincipalResolver resolver, final Credential credential) {
if (resolver.supports(credential)) {
try {
final Principal p = resolver.resolve(credential);
logger.debug("{} resolved {} from {}", resolver, p, credential);
return p;
} catch (final Exception e) {
logger.error("{} failed to resolve principal from {}", resolver, credential, e);
}
} else {
logger.warn(
"{} is configured to use {} but it does not support {}, which suggests a configuration problem.",
handlerName,
resolver,
credential);
}
return null;
}
开发者ID:hsj-xiaokang,项目名称:springboot-shiro-cas-mybatis,代码行数:28,代码来源:PolicyBasedAuthenticationManager.java
示例2: resolvePrincipal
import org.jasig.cas.authentication.principal.PrincipalResolver; //导入方法依赖的package包/类
protected Principal resolvePrincipal(
final String handlerName, final PrincipalResolver resolver, final Credential credential) {
if (resolver.supports(credential)) {
logger.info("{} resolved from {}", resolver, credential);
try {
final Principal p = resolver.resolve(credential);
logger.debug("{} resolved {} from {}", resolver, p, credential);
logger.info("{} resolved {} from {}", resolver, p, credential);
return p;
} catch (final Exception e) {
logger.error("{} failed to resolve principal from {}", resolver, credential, e);
}
} else {
logger.warn(
"{} is configured to use {} but it does not support {}, which suggests a configuration problem.",
handlerName,
resolver,
credential);
logger.info(
"{} is configured to use {} but it does not support {}, which suggests a configuration problem.",
handlerName,
resolver,
credential);
}
return null;
}
示例3: resolvePrincipal
import org.jasig.cas.authentication.principal.PrincipalResolver; //导入方法依赖的package包/类
protected Principal resolvePrincipal(
final String handlerName, final PrincipalResolver resolver, final Credential credential) {
if (resolver.supports(credential)) {
try {
final Principal p = resolver.resolve(credential);
logger.debug("{} resolved {} from {}", resolver, p, credential);
return p;
} catch (final Exception e) {
logger.error("{} failed to resolve principal from {}", resolver, credential, e);
}
} else {
logger.warn(
"{} is configured to use {} but it does not support {}, which suggests a configuration problem.",
handlerName,
resolver,
credential);
}
return null;
}