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


Java SamlObjectParser类代码示例

本文整理汇总了Java中uk.gov.ida.saml.deserializers.parser.SamlObjectParser的典型用法代码示例。如果您正苦于以下问题:Java SamlObjectParser类的具体用法?Java SamlObjectParser怎么用?Java SamlObjectParser使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


SamlObjectParser类属于uk.gov.ida.saml.deserializers.parser包,在下文中一共展示了SamlObjectParser类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: assertStatusCode

import uk.gov.ida.saml.deserializers.parser.SamlObjectParser; //导入依赖的package包/类
private static void assertStatusCode(String samlString, String statusCode) throws javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException, java.io.IOException, org.opensaml.core.xml.io.UnmarshallingException {
    final SamlObjectParser samlObjectParser = new SamlObjectParser();
    final Base64StringDecoder base64Decoder = new Base64StringDecoder();
    String decodedString = base64Decoder.decode(samlString);
    org.opensaml.saml.saml2.core.Response samlResponse = samlObjectParser.getSamlObject(decodedString);
    assertThat(samlResponse.getStatus().getStatusCode().getValue()).isEqualTo(statusCode);
}
 
开发者ID:alphagov,项目名称:verify-hub,代码行数:8,代码来源:RpAuthnResponseGeneratorResourceTest.java

示例2: makeAttributeQueryRequest

import uk.gov.ida.saml.deserializers.parser.SamlObjectParser; //导入依赖的package包/类
public static Response makeAttributeQueryRequest(String uri, AttributeQuery attributeQuery, SignatureAlgorithm signatureAlgorithm, DigestAlgorithm digestAlgorithm, String hubEntityId) {
    ElementToOpenSamlXMLObjectTransformer<Response> responseElementToOpenSamlXMLObjectTransformer = new ElementToOpenSamlXMLObjectTransformer<>(new SamlObjectParser());

    Document attributeQueryDocument = getAttributeQueryToElementTransformer(signatureAlgorithm, digestAlgorithm, hubEntityId).apply(attributeQuery).getOwnerDocument();
    Document soapResponse = JerseyClientBuilder.createClient().target(uri).request()
            .post(Entity.entity(attributeQueryDocument, TEXT_XML_TYPE))
            .readEntity(Document.class);

    Element soapMessage = new SoapMessageManager().unwrapSoapMessage(soapResponse, SamlElementType.Response);
    return responseElementToOpenSamlXMLObjectTransformer.apply(soapMessage);
}
 
开发者ID:alphagov,项目名称:verify-matching-service-adapter,代码行数:12,代码来源:RequestHelper.java

示例3: buildResponseFromFile

import uk.gov.ida.saml.deserializers.parser.SamlObjectParser; //导入依赖的package包/类
private SAMLObject buildResponseFromFile() throws IOException, javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException, org.opensaml.core.xml.io.UnmarshallingException {
    String xmlString = new String(Files.readAllBytes(Paths.get(ResourceHelpers.resourceFilePath("EIDASAMLResponse.xml"))));
    return (Response) new SamlObjectParser().getSamlObject(xmlString);
}
 
开发者ID:alphagov,项目名称:verify-hub,代码行数:5,代码来源:CountryAuthnResponseTranslatorServiceTest.java


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