org.apereo.cas.validation.Assertion.getChainedAuthentications()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(1.9k)|赞(0)|评价(0)|浏览(107)

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

Assertion.getChainedAuthentications介绍

[英]Gets a list of all authentications that have occurred during a CAS SSO session.
[中]获取CAS SSO会话期间发生的所有身份验证的列表。

代码示例

代码示例来源:origin: org.apereo.cas/cas-server-core-validation-api

@Override
  protected boolean isSatisfiedByInternal(final Assertion assertion) {
    LOGGER.trace("Number of chained authentications in the assertion [{}]", assertion.getChainedAuthentications().size());
    return assertion.getChainedAuthentications().size() == 1;
  }
}

代码示例来源:origin: org.apereo.cas/cas-server-core-validation-api

@Override
  protected boolean isSatisfiedByInternal(final Assertion assertion) {
    LOGGER.trace("Number of chained authentications in the assertion [{}]", assertion.getChainedAuthentications().size());
    return assertion.getChainedAuthentications().size() == 1;
  }
}

代码示例来源:origin: org.apereo.cas/cas-server-core-web-api

/**
 * Gets chained authentications.
 * Note that the last index in the list always describes the primary authentication
 * event. All others in the chain should denote proxies. Per the CAS protocol,
 * when authentication has proceeded through multiple proxies,
 * the order in which the proxies were traversed MUST be reflected in the response.
 * The most recently-visited proxy MUST be the first proxy listed, and all the
 * other proxies MUST be shifted down as new proxies are added.
 *
 * @param model the model
 * @return the chained authentications
 */
protected Collection<Authentication> getChainedAuthentications(final Map<String, Object> model) {
  val assertion = getAssertionFrom(model);
  val chainedAuthentications = assertion.getChainedAuthentications();
  return chainedAuthentications.stream().limit(chainedAuthentications.size() - 1).collect(Collectors.toList());
}

相关文章