keycloak-service
クラス | 静的公開メンバ関数 | 全メンバ一覧
org.keycloak.protocol.saml.profile.ecp.util.Soap クラス
org.keycloak.protocol.saml.profile.ecp.util.Soap 連携図
Collaboration graph

クラス

class  SoapFaultBuilder
 
class  SoapMessageBuilder
 

静的公開メンバ関数

static SoapFaultBuilder createFault ()
 
static SoapMessageBuilder createMessage ()
 
static String toSamlHttpPostMessage (InputStream inputStream)
 

詳解

著者
Pedro Igor

関数詳解

◆ createFault()

static SoapFaultBuilder org.keycloak.protocol.saml.profile.ecp.util.Soap.createFault ( )
inlinestatic
43  {
44  return new SoapFaultBuilder();
45  }

◆ createMessage()

static SoapMessageBuilder org.keycloak.protocol.saml.profile.ecp.util.Soap.createMessage ( )
inlinestatic
47  {
48  return new SoapMessageBuilder();
49  }

◆ toSamlHttpPostMessage()

static String org.keycloak.protocol.saml.profile.ecp.util.Soap.toSamlHttpPostMessage ( InputStream  inputStream)
inlinestatic

Returns a string encoded accordingly with the SAML HTTP POST Binding specification based on the given inputStream which must contain a valid SOAP message.

The resulting string is based on the Body of the SOAP message, which should map to a valid SAML message.

引数
inputStreamthe input stream containing a valid SOAP message with a Body that contains a SAML message
戻り値
a string encoded accordingly with the SAML HTTP POST Binding specification
61  {
62  try {
63  MessageFactory messageFactory = MessageFactory.newInstance();
64  SOAPMessage soapMessage = messageFactory.createMessage(null, inputStream);
65  SOAPBody soapBody = soapMessage.getSOAPBody();
66  Node authnRequestNode = soapBody.getFirstChild();
67  Document document = DocumentUtil.createDocument();
68 
69  document.appendChild(document.importNode(authnRequestNode, true));
70 
71  return PostBindingUtil.base64Encode(DocumentUtil.asString(document));
72  } catch (Exception e) {
73  throw new RuntimeException("Error creating fault message.", e);
74  }
75  }

このクラス詳解は次のファイルから抽出されました: