本文整理了Java中org.apereo.cas.validation.Assertion.getService()
方法的一些代码示例,展示了Assertion.getService()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Assertion.getService()
方法的具体详情如下:
包路径:org.apereo.cas.validation.Assertion
类名称:Assertion
方法名:getService
[英]Method to obtain the service for which we are asserting this ticket is valid for.
[中]方法获取我们断言此票证对其有效的服务。
代码示例来源:origin: org.apereo.cas/cas-server-core-validation
@Bean
@ConditionalOnMissingBean(name = "requestedContextValidator")
public RequestedContextValidator requestedContextValidator() {
return (assertion, request) -> {
LOGGER.debug("Locating the primary authentication associated with this service request [{}]", assertion.getService());
val service = servicesManager.getIfAvailable().findServiceBy(assertion.getService());
RegisteredServiceAccessStrategyUtils.ensureServiceAccessIsAllowed(assertion.getService(), service);
return Pair.of(Boolean.TRUE, Optional.empty());
};
}
}
代码示例来源:origin: org.apereo.cas/cas-server-core-authentication-mfa-api
@Override
public Pair<Boolean, Optional<MultifactorAuthenticationProvider>> validateAuthenticationContext(final Assertion assertion, final HttpServletRequest request) {
LOGGER.debug("Locating the primary authentication associated with this service request [{}]", assertion.getService());
val registeredService = servicesManager.findServiceBy(assertion.getService());
val authentication = assertion.getPrimaryAuthentication();
val requestedContext = multifactorTriggerSelectionStrategy.resolve(request, registeredService, authentication, assertion.getService());
if (requestedContext.isEmpty()) {
LOGGER.debug("No particular authentication context is required for this request");
return Pair.of(Boolean.TRUE, Optional.empty());
}
return authenticationContextValidator.validate(authentication, requestedContext.get(), registeredService);
}
}
代码示例来源:origin: org.apereo.cas/cas-server-support-saml
val service = getAssertionFrom(model).getService();
LOGGER.debug("Preparing SAML response for service [{}]", service);
代码示例来源:origin: org.apereo.cas/cas-server-support-validation
throw new UnsatisfiedAuthenticationContextTicketValidationException(assertion.getService());
内容来源于网络,如有侵权,请联系作者删除!