本文整理了Java中org.opensaml.saml.saml2.core.Response.getIssueInstant
方法的一些代码示例,展示了Response.getIssueInstant
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Response.getIssueInstant
方法的具体详情如下:
包路径:org.opensaml.saml.saml2.core.Response
类名称:Response
方法名:getIssueInstant
暂无
代码示例来源:origin: line/armeria
final DateTime issueInstant = response.getIssueInstant();
if (issueInstant == null) {
throw new SamlException("failed to get IssueInstant attribute");
代码示例来源:origin: org.opensaml/opensaml-saml-api
/**
* Constructs and adds a {@link Assertion} to the given {@link Response}. The {@link Assertion} is constructed
* using the parameters supplied, and its issue instant is set to the issue instant of the given {@link Response}.
*
* @param action the current action
* @param response the response to which the assertion will be added
* @param idGenerator source of assertion ID
* @param issuer value for assertion
*
* @return the assertion that was added to the response
*/
@Nonnull public static Assertion addAssertionToResponse(@Nonnull final AbstractProfileAction action,
@Nonnull final Response response, @Nonnull final IdentifierGenerationStrategy idGenerator,
@Nullable final String issuer) {
final Assertion assertion = buildAssertion(action, idGenerator, issuer);
assertion.setIssueInstant(response.getIssueInstant());
getLogger().debug("Profile Action {}: Added Assertion {} to Response {}",
new Object[] {action.getClass().getSimpleName(), assertion.getID(), response.getID(),});
response.getAssertions().add(assertion);
return assertion;
}
代码示例来源:origin: org.opensaml/opensaml-saml-impl
/** {@inheritDoc} */
@Override
protected void doExecute(@Nonnull final ProfileRequestContext profileRequestContext) {
if (response instanceof org.opensaml.saml.saml1.core.Response) {
for (final org.opensaml.saml.saml1.core.Assertion assertion :
((org.opensaml.saml.saml1.core.Response) response).getAssertions()) {
log.debug("{} Added NotBefore condition to Assertion {}", getLogPrefix(), assertion.getID());
SAML1ActionSupport.addConditionsToAssertion(this, assertion).setNotBefore(
((org.opensaml.saml.saml1.core.Response) response).getIssueInstant());
}
} else if (response instanceof org.opensaml.saml.saml2.core.Response) {
for (final org.opensaml.saml.saml2.core.Assertion assertion :
((org.opensaml.saml.saml2.core.Response) response).getAssertions()) {
log.debug("{} Added NotBefore condition to Assertion {}", getLogPrefix(), assertion.getID());
SAML2ActionSupport.addConditionsToAssertion(this, assertion).setNotBefore(
((org.opensaml.saml.saml2.core.Response) response).getIssueInstant());
}
}
}
代码示例来源:origin: apache/cxf
if (samlResponse.getIssueInstant() != null) {
DateTime currentTime = new DateTime();
currentTime = currentTime.plusSeconds(futureTTL);
if (samlResponse.getIssueInstant().isAfter(currentTime)) {
LOG.fine("SAML Response IssueInstant not met");
throw new WSSecurityException(WSSecurityException.ErrorCode.FAILURE, "invalidSAMLsecurity");
代码示例来源:origin: apache/cxf
validatorResponse.setResponseId(samlResponse.getID());
validatorResponse.setSessionNotOnOrAfter(sessionNotOnOrAfter);
if (samlResponse.getIssueInstant() != null) {
validatorResponse.setCreated(Instant.ofEpochMilli(samlResponse.getIssueInstant().toDate().getTime()));
代码示例来源:origin: spring-projects/spring-security-saml
.setId(parsed.getID())
.setInResponseTo(parsed.getInResponseTo())
.setIssueInstant(parsed.getIssueInstant())
.setIssuer(getIssuer(parsed.getIssuer()))
.setVersion(parsed.getVersion().toString())
代码示例来源:origin: com.linecorp.armeria/armeria-saml
final DateTime issueInstant = response.getIssueInstant();
if (issueInstant == null) {
throw new SamlException("failed to get IssueInstant attribute");
代码示例来源:origin: org.pac4j/pac4j-saml
validateIssueInstant(response.getIssueInstant());
内容来源于网络,如有侵权,请联系作者删除!