本文整理了Java中org.opensaml.saml2.core.Response.getInResponseTo
方法的一些代码示例,展示了Response.getInResponseTo
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Response.getInResponseTo
方法的具体详情如下:
包路径:org.opensaml.saml2.core.Response
类名称:Response
方法名:getInResponseTo
暂无
代码示例来源:origin: cloudfoundry/uaa
@Test
public void testBuildResponse() throws MessageEncodingException, SAMLException, MetadataProviderException,
SecurityException, MarshallingException, SignatureException {
String authenticationId = UUID.randomUUID().toString();
Authentication authentication = samlTestUtils.mockUaaAuthentication(authenticationId);
SAMLMessageContext context = samlTestUtils.mockSamlMessageContext();
IdpWebSSOProfileOptions options = new IdpWebSSOProfileOptions();
options.setAssertionsSigned(false);
profile.buildResponse(authentication, context, options);
AuthnRequest request = (AuthnRequest) context.getInboundSAMLMessage();
Response response = (Response) context.getOutboundSAMLMessage();
assertEquals(request.getID(), response.getInResponseTo());
Assertion assertion = response.getAssertions().get(0);
Subject subject = assertion.getSubject();
assertEquals("marissa", subject.getNameID().getValue());
assertEquals(NameIDType.UNSPECIFIED, subject.getNameID().getFormat());
SubjectConfirmation subjectConfirmation = subject.getSubjectConfirmations().get(0);
SubjectConfirmationData subjectConfirmationData = subjectConfirmation.getSubjectConfirmationData();
assertEquals(request.getID(), subjectConfirmationData.getInResponseTo());
verifyAssertionAttributes(authenticationId, assertion);
}
代码示例来源:origin: apache/cloudstack
SAMLProviderMetadata idpMetadata = samlAuthManager.getIdPMetadata(issuer.getValue());
String responseToId = processedSAMLResponse.getInResponseTo();
s_logger.debug("Received SAMLResponse in response to id=" + responseToId);
SAMLTokenVO token = samlAuthManager.getToken(responseToId);
代码示例来源:origin: be.fedict.eid-idp/eid-idp-sp-protocol-saml2
if (!samlResponse.getInResponseTo().equals(requestId)) {
代码示例来源:origin: org.springframework.security.extensions/spring-security-saml2-core
if (!context.getPeerExtendedMetadata().isSupportUnsolicitedResponse() && response.getInResponseTo() == null) {
throw new SAMLException("Reception of Unsolicited Response messages (without InResponseToField) is disabled");
if (messageStorage != null && response.getInResponseTo() != null) {
XMLObject xmlObject = messageStorage.retrieveMessage(response.getInResponseTo());
if (xmlObject == null) {
throw new SAMLException("InResponseToField of the Response doesn't correspond to sent message " + response.getInResponseTo());
} else if (xmlObject instanceof AuthnRequest) {
request = (AuthnRequest) xmlObject;
} else {
throw new SAMLException("Sent request was of different type than the expected AuthnRequest " + response.getInResponseTo());
内容来源于网络,如有侵权,请联系作者删除!