当前位置: 首页>>代码示例>>Java>>正文


Java ArtifactResponse.setMessage方法代码示例

本文整理汇总了Java中org.opensaml.saml2.core.ArtifactResponse.setMessage方法的典型用法代码示例。如果您正苦于以下问题:Java ArtifactResponse.setMessage方法的具体用法?Java ArtifactResponse.setMessage怎么用?Java ArtifactResponse.setMessage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.opensaml.saml2.core.ArtifactResponse的用法示例。


在下文中一共展示了ArtifactResponse.setMessage方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: processChildElement

import org.opensaml.saml2.core.ArtifactResponse; //导入方法依赖的package包/类
/** {@inheritDoc} */
protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject)
        throws UnmarshallingException {
    ArtifactResponse artifactResponse = (ArtifactResponse) parentSAMLObject;

    if (childSAMLObject instanceof Issuer) {
        artifactResponse.setIssuer((Issuer) childSAMLObject);
    } else if (childSAMLObject instanceof Signature) {
        artifactResponse.setSignature((Signature) childSAMLObject);
    } else if (childSAMLObject instanceof Extensions) {
        artifactResponse.setExtensions((Extensions) childSAMLObject);
    } else if (childSAMLObject instanceof Status) {
        artifactResponse.setStatus((Status) childSAMLObject);
    } else {
        artifactResponse.setMessage((SAMLObject) childSAMLObject);
    }
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:18,代码来源:ArtifactResponseUnmarshaller.java

示例2: buildArtifactResponse

import org.opensaml.saml2.core.ArtifactResponse; //导入方法依赖的package包/类
private ArtifactResponse buildArtifactResponse() throws IllegalAccessException, NoSuchAlgorithmException, KeyStoreException,
		java.security.cert.CertificateException, CertificateException, IOException, SecurityException, EncryptionException, NoSuchProviderException,
		SignatureException, MarshallingException, MetadataProviderException {
	SecureRandomIdentifierGenerator idGenerator = new SecureRandomIdentifierGenerator();

	ArtifactResponse artifactResponse = buildXMLObjectDefaultName(ArtifactResponse.class);

	Issuer issuer = buildXMLObjectDefaultName(Issuer.class);
	issuer.setValue(MockIDPProperties.getIdpEntityId());
	artifactResponse.setIssuer(issuer);
	artifactResponse.setIssueInstant(new DateTime());
	artifactResponse.setDestination(MockIDPSPMetadata.getSpConsumerUrl());

	artifactResponse.setID(idGenerator.generateIdentifier());

	Status status = buildXMLObjectDefaultName(Status.class);
	StatusCode statusCode = buildXMLObjectDefaultName(StatusCode.class);
	statusCode.setValue(StatusCode.SUCCESS_URI);
	status.setStatusCode(statusCode);
	artifactResponse.setStatus(status);

	Response response = buildXMLObjectDefaultName(Response.class);
	response.setDestination(MockIDPSPMetadata.getSpConsumerUrl());
	response.setIssueInstant(new DateTime());
	response.setID(idGenerator.generateIdentifier());
	response.setInResponseTo(MockIDPAuthnReq.authnReqId);
	Issuer issuer2 = buildXMLObjectDefaultName(Issuer.class);
	issuer2.setValue(MockIDPProperties.getIdpEntityId());

	response.setIssuer(issuer2);

	Status status2 = buildXMLObjectDefaultName(Status.class);
	StatusCode statusCode2 = buildXMLObjectDefaultName(StatusCode.class);
	statusCode2.setValue(StatusCode.SUCCESS_URI);
	status2.setStatusCode(statusCode2);

	response.setStatus(status2);

	artifactResponse.setMessage(response);

	response.getEncryptedAssertions().add(encryptAssertion(buildAssertion()));
	return artifactResponse;
}
 
开发者ID:rasmusson,项目名称:MockIDP,代码行数:44,代码来源:MockIDPArtifactResolve.java


注:本文中的org.opensaml.saml2.core.ArtifactResponse.setMessage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。