Modified: webservices/wss4j/site/xref/org/apache/ws/security/message/token/package-frame.html URL: http://svn.apache.org/viewvc/webservices/wss4j/site/xref/org/apache/ws/security/message/token/package-frame.html?rev=1178426&r1=1178425&r2=1178426&view=diff ============================================================================== --- webservices/wss4j/site/xref/org/apache/ws/security/message/token/package-frame.html (original) +++ webservices/wss4j/site/xref/org/apache/ws/security/message/token/package-frame.html Mon Oct 3 15:15:52 2011 @@ -3,7 +3,7 @@ <html xml:lang="en" lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /> - <title>WSS4J 1.6.2 Reference Package org.apache.ws.security.message.token</title> + <title>WSS4J 1.6.3 Reference Package org.apache.ws.security.message.token</title> <link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="style" /> </head> <body>
Modified: webservices/wss4j/site/xref/org/apache/ws/security/message/token/package-summary.html URL: http://svn.apache.org/viewvc/webservices/wss4j/site/xref/org/apache/ws/security/message/token/package-summary.html?rev=1178426&r1=1178425&r2=1178426&view=diff ============================================================================== --- webservices/wss4j/site/xref/org/apache/ws/security/message/token/package-summary.html (original) +++ webservices/wss4j/site/xref/org/apache/ws/security/message/token/package-summary.html Mon Oct 3 15:15:52 2011 @@ -3,7 +3,7 @@ <html xml:lang="en" lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /> - <title>WSS4J 1.6.2 Reference Package org.apache.ws.security.message.token</title> + <title>WSS4J 1.6.3 Reference Package org.apache.ws.security.message.token</title> <link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="style" /> </head> <body> Modified: webservices/wss4j/site/xref/org/apache/ws/security/package-frame.html URL: http://svn.apache.org/viewvc/webservices/wss4j/site/xref/org/apache/ws/security/package-frame.html?rev=1178426&r1=1178425&r2=1178426&view=diff ============================================================================== --- webservices/wss4j/site/xref/org/apache/ws/security/package-frame.html (original) +++ webservices/wss4j/site/xref/org/apache/ws/security/package-frame.html Mon Oct 3 15:15:52 2011 @@ -3,7 +3,7 @@ <html xml:lang="en" lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /> - <title>WSS4J 1.6.2 Reference Package org.apache.ws.security</title> + <title>WSS4J 1.6.3 Reference Package org.apache.ws.security</title> <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="style" /> </head> <body> @@ -16,9 +16,15 @@ <ul> <li> + <a href="NamePasswordCallbackHandler.html" target="classFrame"></a> + </li> + <li> <a href="CustomTokenPrincipal.html" target="classFrame">CustomTokenPrincipal</a> </li> <li> + <a href="NamePasswordCallbackHandler.html" target="classFrame">NamePasswordCallbackHandler</a> + </li> + <li> <a href="PublicKeyPrincipal.html" target="classFrame">PublicKeyPrincipal</a> </li> <li> Modified: webservices/wss4j/site/xref/org/apache/ws/security/package-summary.html URL: http://svn.apache.org/viewvc/webservices/wss4j/site/xref/org/apache/ws/security/package-summary.html?rev=1178426&r1=1178425&r2=1178426&view=diff ============================================================================== --- webservices/wss4j/site/xref/org/apache/ws/security/package-summary.html (original) +++ webservices/wss4j/site/xref/org/apache/ws/security/package-summary.html Mon Oct 3 15:15:52 2011 @@ -3,7 +3,7 @@ <html xml:lang="en" lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /> - <title>WSS4J 1.6.2 Reference Package org.apache.ws.security</title> + <title>WSS4J 1.6.3 Reference Package org.apache.ws.security</title> <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="style" /> </head> <body> @@ -37,11 +37,21 @@ <tbody> <tr> <td> + <a href="NamePasswordCallbackHandler.html" target="classFrame"></a> + </td> + </tr> + <tr> + <td> <a href="CustomTokenPrincipal.html" target="classFrame">CustomTokenPrincipal</a> </td> </tr> <tr> <td> + <a href="NamePasswordCallbackHandler.html" target="classFrame">NamePasswordCallbackHandler</a> + </td> + </tr> + <tr> + <td> <a href="PublicKeyPrincipal.html" target="classFrame">PublicKeyPrincipal</a> </td> </tr> Modified: webservices/wss4j/site/xref/org/apache/ws/security/processor/BinarySecurityTokenProcessor.html URL: http://svn.apache.org/viewvc/webservices/wss4j/site/xref/org/apache/ws/security/processor/BinarySecurityTokenProcessor.html?rev=1178426&r1=1178425&r2=1178426&view=diff ============================================================================== --- webservices/wss4j/site/xref/org/apache/ws/security/processor/BinarySecurityTokenProcessor.html (original) +++ webservices/wss4j/site/xref/org/apache/ws/security/processor/BinarySecurityTokenProcessor.html Mon Oct 3 15:15:52 2011 @@ -62,99 +62,112 @@ <a name="52" href="#52">52</a> <a href="../../../../../org/apache/ws/security/handler/RequestData.html">RequestData</a> data, <a name="53" href="#53">53</a> <a href="../../../../../org/apache/ws/security/WSDocInfo.html">WSDocInfo</a> wsDocInfo <a name="54" href="#54">54</a> ) <strong class="jxr_keyword">throws</strong> <a href="../../../../../org/apache/ws/security/WSSecurityException.html">WSSecurityException</a> { -<a name="55" href="#55">55</a> -<a name="56" href="#56">56</a> <a href="../../../../../org/apache/ws/security/message/token/BinarySecurity.html">BinarySecurity</a> token = createSecurityToken(elem, data.getWssConfig()); -<a name="57" href="#57">57</a> X509Certificate[] certs = <strong class="jxr_keyword">null</strong>; -<a name="58" href="#58">58</a> <a href="../../../../../org/apache/ws/security/validate/Validator.html">Validator</a> validator = data.getValidator(<strong class="jxr_keyword">new</strong> QName(elem.getNamespaceURI(), -<a name="59" href="#59">59</a> elem.getLocalName())); -<a name="60" href="#60">60</a> -<a name="61" href="#61">61</a> <strong class="jxr_keyword">if</strong> (data.getSigCrypto() == <strong class="jxr_keyword">null</strong>) { -<a name="62" href="#62">62</a> certs = getCertificatesTokenReference(token, data.getDecCrypto()); -<a name="63" href="#63">63</a> } <strong class="jxr_keyword">else</strong> { -<a name="64" href="#64">64</a> certs = getCertificatesTokenReference(token, data.getSigCrypto()); -<a name="65" href="#65">65</a> } -<a name="66" href="#66">66</a> -<a name="67" href="#67">67</a> <a href="../../../../../org/apache/ws/security/WSSecurityEngineResult.html">WSSecurityEngineResult</a> result = -<a name="68" href="#68">68</a> <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/ws/security/WSSecurityEngineResult.html">WSSecurityEngineResult</a>(WSConstants.BST, token, certs); -<a name="69" href="#69">69</a> wsDocInfo.addTokenElement(elem); -<a name="70" href="#70">70</a> String id = elem.getAttributeNS(WSConstants.WSU_NS, <span class="jxr_string">"Id"</span>); -<a name="71" href="#71">71</a> result.put(WSSecurityEngineResult.TAG_ID, id); -<a name="72" href="#72">72</a> -<a name="73" href="#73">73</a> <strong class="jxr_keyword">if</strong> (validator != <strong class="jxr_keyword">null</strong>) { -<a name="74" href="#74">74</a> <em class="jxr_comment">// Hook to allow the user to validate the BinarySecurityToken</em> -<a name="75" href="#75">75</a> <a href="../../../../../org/apache/ws/security/validate/Credential.html">Credential</a> credential = <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/ws/security/validate/Credential.html">Credential</a>(); -<a name="76" href="#76">76</a> credential.setBinarySecurityToken(token); -<a name="77" href="#77">77</a> credential.setCertificates(certs); -<a name="78" href="#78">78</a> -<a name="79" href="#79">79</a> <a href="../../../../../org/apache/ws/security/validate/Credential.html">Credential</a> returnedCredential = validator.validate(credential, data); -<a name="80" href="#80">80</a> result.put(WSSecurityEngineResult.TAG_VALIDATED_TOKEN, Boolean.TRUE); -<a name="81" href="#81">81</a> -<a name="82" href="#82">82</a> <strong class="jxr_keyword">if</strong> (returnedCredential.getTransformedToken() != <strong class="jxr_keyword">null</strong>) { -<a name="83" href="#83">83</a> result.put( -<a name="84" href="#84">84</a> WSSecurityEngineResult.TAG_TRANSFORMED_TOKEN, -<a name="85" href="#85">85</a> returnedCredential.getTransformedToken() -<a name="86" href="#86">86</a> ); -<a name="87" href="#87">87</a> <a href="../../../../../org/apache/ws/security/SAMLTokenPrincipal.html">SAMLTokenPrincipal</a> samlPrincipal = -<a name="88" href="#88">88</a> <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/ws/security/SAMLTokenPrincipal.html">SAMLTokenPrincipal</a>(credential.getTransformedToken()); -<a name="89" href="#89">89</a> result.put(WSSecurityEngineResult.TAG_PRINCIPAL, samlPrincipal); -<a name="90" href="#90">90</a> } <strong class="jxr_keyword">else</strong> <strong class="jxr_keyword">if</strong> (credential.getPrincipal() != <strong class="jxr_keyword">null</strong>) { -<a name="91" href="#91">91</a> result.put(WSSecurityEngineResult.TAG_PRINCIPAL, credential.getPrincipal()); -<a name="92" href="#92">92</a> } <strong class="jxr_keyword">else</strong> <strong class="jxr_keyword">if</strong> (certs != <strong class="jxr_keyword">null</strong> && certs[0] != <strong class="jxr_keyword">null</strong>) { -<a name="93" href="#93">93</a> result.put(WSSecurityEngineResult.TAG_PRINCIPAL, certs[0].getSubjectX500Principal()); -<a name="94" href="#94">94</a> } -<a name="95" href="#95">95</a> } -<a name="96" href="#96">96</a> -<a name="97" href="#97">97</a> wsDocInfo.addResult(result); -<a name="98" href="#98">98</a> <strong class="jxr_keyword">return</strong> java.util.Collections.singletonList(result); -<a name="99" href="#99">99</a> } -<a name="100" href="#100">100</a> -<a name="101" href="#101">101</a> <em class="jxr_javadoccomment">/**</em> -<a name="102" href="#102">102</a> <em class="jxr_javadoccomment"> * Extracts the certificate(s) from the Binary Security token reference.</em> -<a name="103" href="#103">103</a> <em class="jxr_javadoccomment"> *</em> -<a name="104" href="#104">104</a> <em class="jxr_javadoccomment"> * @param token The BinarySecurity instance corrresponding to either X509Security or </em> -<a name="105" href="#105">105</a> <em class="jxr_javadoccomment"> * PKIPathSecurity</em> -<a name="106" href="#106">106</a> <em class="jxr_javadoccomment"> * @return The X509Certificates associated with this reference</em> -<a name="107" href="#107">107</a> <em class="jxr_javadoccomment"> * @throws WSSecurityException</em> -<a name="108" href="#108">108</a> <em class="jxr_javadoccomment"> */</em> -<a name="109" href="#109">109</a> <strong class="jxr_keyword">private</strong> X509Certificate[] getCertificatesTokenReference(<a href="../../../../../org/apache/ws/security/message/token/BinarySecurity.html">BinarySecurity</a> token, <a href="../../../../../org/apache/ws/security/components/crypto/Crypto.html">Crypto</a> crypto) -<a name="110" href="#110">110</a> <strong class="jxr_keyword">throws</strong> <a href="../../../../../org/apache/ws/security/WSSecurityException.html">WSSecurityException</a> { -<a name="111" href="#111">111</a> <strong class="jxr_keyword">if</strong> (token instanceof PKIPathSecurity) { -<a name="112" href="#112">112</a> <strong class="jxr_keyword">return</strong> ((PKIPathSecurity) token).getX509Certificates(crypto); -<a name="113" href="#113">113</a> } <strong class="jxr_keyword">else</strong> <strong class="jxr_keyword">if</strong> (token instanceof X509Security) { -<a name="114" href="#114">114</a> X509Certificate cert = ((X509Security) token).getX509Certificate(crypto); -<a name="115" href="#115">115</a> <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">new</strong> X509Certificate[]{cert}; -<a name="116" href="#116">116</a> } -<a name="117" href="#117">117</a> <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">null</strong>; -<a name="118" href="#118">118</a> } -<a name="119" href="#119">119</a> -<a name="120" href="#120">120</a> <em class="jxr_javadoccomment">/**</em> -<a name="121" href="#121">121</a> <em class="jxr_javadoccomment"> * Checks the <code>element</code> and creates appropriate binary security object.</em> -<a name="122" href="#122">122</a> <em class="jxr_javadoccomment"> *</em> -<a name="123" href="#123">123</a> <em class="jxr_javadoccomment"> * @param element The XML element that contains either a <code>BinarySecurityToken</em> -<a name="124" href="#124">124</a> <em class="jxr_javadoccomment"> * </code> or a <code>PKIPath</code> element.</em> -<a name="125" href="#125">125</a> <em class="jxr_javadoccomment"> * @param config A WSSConfig instance</em> -<a name="126" href="#126">126</a> <em class="jxr_javadoccomment"> * @return a BinarySecurity token element</em> -<a name="127" href="#127">127</a> <em class="jxr_javadoccomment"> * @throws WSSecurityException</em> -<a name="128" href="#128">128</a> <em class="jxr_javadoccomment"> */</em> -<a name="129" href="#129">129</a> <strong class="jxr_keyword">private</strong> <a href="../../../../../org/apache/ws/security/message/token/BinarySecurity.html">BinarySecurity</a> createSecurityToken( -<a name="130" href="#130">130</a> Element element, -<a name="131" href="#131">131</a> <a href="../../../../../org/apache/ws/security/WSSConfig.html">WSSConfig</a> config -<a name="132" href="#132">132</a> ) <strong class="jxr_keyword">throws</strong> <a href="../../../../../org/apache/ws/security/WSSecurityException.html">WSSecurityException</a> { -<a name="133" href="#133">133</a> String type = element.getAttribute(<span class="jxr_string">"ValueType"</span>); -<a name="134" href="#134">134</a> <a href="../../../../../org/apache/ws/security/message/token/BinarySecurity.html">BinarySecurity</a> token = <strong class="jxr_keyword">null</strong>; -<a name="135" href="#135">135</a> <strong class="jxr_keyword">if</strong> (X509Security.X509_V3_TYPE.equals(type)) { -<a name="136" href="#136">136</a> token = <strong class="jxr_keyword">new</strong> X509Security(element, config.isWsiBSPCompliant()); -<a name="137" href="#137">137</a> } <strong class="jxr_keyword">else</strong> <strong class="jxr_keyword">if</strong> (PKIPathSecurity.getType().equals(type)) { -<a name="138" href="#138">138</a> token = <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/ws/security/message/token/PKIPathSecurity.html">PKIPathSecurity</a>(element, config.isWsiBSPCompliant()); -<a name="139" href="#139">139</a> } <strong class="jxr_keyword">else</strong> <strong class="jxr_keyword">if</strong> (KerberosSecurity.isKerberosToken(type)) { -<a name="140" href="#140">140</a> token = <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/ws/security/message/token/KerberosSecurity.html">KerberosSecurity</a>(element, config.isWsiBSPCompliant()); -<a name="141" href="#141">141</a> } <strong class="jxr_keyword">else</strong> { -<a name="142" href="#142">142</a> token = <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/ws/security/message/token/BinarySecurity.html">BinarySecurity</a>(element, config.isWsiBSPCompliant()); -<a name="143" href="#143">143</a> } -<a name="144" href="#144">144</a> <strong class="jxr_keyword">return</strong> token; -<a name="145" href="#145">145</a> } -<a name="146" href="#146">146</a> -<a name="147" href="#147">147</a> } +<a name="55" href="#55">55</a> <em class="jxr_comment">// See if the token has been previously processed</em> +<a name="56" href="#56">56</a> String id = elem.getAttributeNS(WSConstants.WSU_NS, <span class="jxr_string">"Id"</span>); +<a name="57" href="#57">57</a> <strong class="jxr_keyword">if</strong> (!<span class="jxr_string">""</span>.equals(id)) { +<a name="58" href="#58">58</a> Element foundElement = wsDocInfo.getTokenElement(id); +<a name="59" href="#59">59</a> <strong class="jxr_keyword">if</strong> (elem.equals(foundElement)) { +<a name="60" href="#60">60</a> <a href="../../../../../org/apache/ws/security/WSSecurityEngineResult.html">WSSecurityEngineResult</a> result = wsDocInfo.getResult(id); +<a name="61" href="#61">61</a> <strong class="jxr_keyword">return</strong> java.util.Collections.singletonList(result); +<a name="62" href="#62">62</a> } <strong class="jxr_keyword">else</strong> <strong class="jxr_keyword">if</strong> (foundElement != <strong class="jxr_keyword">null</strong>) { +<a name="63" href="#63">63</a> <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/ws/security/WSSecurityException.html">WSSecurityException</a>( +<a name="64" href="#64">64</a> WSSecurityException.INVALID_SECURITY_TOKEN, <span class="jxr_string">"duplicateError"</span> +<a name="65" href="#65">65</a> ); +<a name="66" href="#66">66</a> } +<a name="67" href="#67">67</a> } +<a name="68" href="#68">68</a> +<a name="69" href="#69">69</a> <a href="../../../../../org/apache/ws/security/message/token/BinarySecurity.html">BinarySecurity</a> token = createSecurityToken(elem, data.getWssConfig()); +<a name="70" href="#70">70</a> X509Certificate[] certs = <strong class="jxr_keyword">null</strong>; +<a name="71" href="#71">71</a> <a href="../../../../../org/apache/ws/security/validate/Validator.html">Validator</a> validator = data.getValidator(<strong class="jxr_keyword">new</strong> QName(elem.getNamespaceURI(), +<a name="72" href="#72">72</a> elem.getLocalName())); +<a name="73" href="#73">73</a> +<a name="74" href="#74">74</a> <strong class="jxr_keyword">if</strong> (data.getSigCrypto() == <strong class="jxr_keyword">null</strong>) { +<a name="75" href="#75">75</a> certs = getCertificatesTokenReference(token, data.getDecCrypto()); +<a name="76" href="#76">76</a> } <strong class="jxr_keyword">else</strong> { +<a name="77" href="#77">77</a> certs = getCertificatesTokenReference(token, data.getSigCrypto()); +<a name="78" href="#78">78</a> } +<a name="79" href="#79">79</a> +<a name="80" href="#80">80</a> <a href="../../../../../org/apache/ws/security/WSSecurityEngineResult.html">WSSecurityEngineResult</a> result = +<a name="81" href="#81">81</a> <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/ws/security/WSSecurityEngineResult.html">WSSecurityEngineResult</a>(WSConstants.BST, token, certs); +<a name="82" href="#82">82</a> wsDocInfo.addTokenElement(elem); +<a name="83" href="#83">83</a> result.put(WSSecurityEngineResult.TAG_ID, id); +<a name="84" href="#84">84</a> +<a name="85" href="#85">85</a> <strong class="jxr_keyword">if</strong> (validator != <strong class="jxr_keyword">null</strong>) { +<a name="86" href="#86">86</a> <em class="jxr_comment">// Hook to allow the user to validate the BinarySecurityToken</em> +<a name="87" href="#87">87</a> <a href="../../../../../org/apache/ws/security/validate/Credential.html">Credential</a> credential = <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/ws/security/validate/Credential.html">Credential</a>(); +<a name="88" href="#88">88</a> credential.setBinarySecurityToken(token); +<a name="89" href="#89">89</a> credential.setCertificates(certs); +<a name="90" href="#90">90</a> +<a name="91" href="#91">91</a> <a href="../../../../../org/apache/ws/security/validate/Credential.html">Credential</a> returnedCredential = validator.validate(credential, data); +<a name="92" href="#92">92</a> result.put(WSSecurityEngineResult.TAG_VALIDATED_TOKEN, Boolean.TRUE); +<a name="93" href="#93">93</a> result.put(WSSecurityEngineResult.TAG_SECRET, returnedCredential.getSecretKey()); +<a name="94" href="#94">94</a> +<a name="95" href="#95">95</a> <strong class="jxr_keyword">if</strong> (returnedCredential.getTransformedToken() != <strong class="jxr_keyword">null</strong>) { +<a name="96" href="#96">96</a> result.put( +<a name="97" href="#97">97</a> WSSecurityEngineResult.TAG_TRANSFORMED_TOKEN, +<a name="98" href="#98">98</a> returnedCredential.getTransformedToken() +<a name="99" href="#99">99</a> ); +<a name="100" href="#100">100</a> <a href="../../../../../org/apache/ws/security/SAMLTokenPrincipal.html">SAMLTokenPrincipal</a> samlPrincipal = +<a name="101" href="#101">101</a> <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/ws/security/SAMLTokenPrincipal.html">SAMLTokenPrincipal</a>(credential.getTransformedToken()); +<a name="102" href="#102">102</a> result.put(WSSecurityEngineResult.TAG_PRINCIPAL, samlPrincipal); +<a name="103" href="#103">103</a> } <strong class="jxr_keyword">else</strong> <strong class="jxr_keyword">if</strong> (credential.getPrincipal() != <strong class="jxr_keyword">null</strong>) { +<a name="104" href="#104">104</a> result.put(WSSecurityEngineResult.TAG_PRINCIPAL, credential.getPrincipal()); +<a name="105" href="#105">105</a> } <strong class="jxr_keyword">else</strong> <strong class="jxr_keyword">if</strong> (certs != <strong class="jxr_keyword">null</strong> && certs[0] != <strong class="jxr_keyword">null</strong>) { +<a name="106" href="#106">106</a> result.put(WSSecurityEngineResult.TAG_PRINCIPAL, certs[0].getSubjectX500Principal()); +<a name="107" href="#107">107</a> } +<a name="108" href="#108">108</a> } +<a name="109" href="#109">109</a> +<a name="110" href="#110">110</a> wsDocInfo.addResult(result); +<a name="111" href="#111">111</a> <strong class="jxr_keyword">return</strong> java.util.Collections.singletonList(result); +<a name="112" href="#112">112</a> } +<a name="113" href="#113">113</a> +<a name="114" href="#114">114</a> <em class="jxr_javadoccomment">/**</em> +<a name="115" href="#115">115</a> <em class="jxr_javadoccomment"> * Extracts the certificate(s) from the Binary Security token reference.</em> +<a name="116" href="#116">116</a> <em class="jxr_javadoccomment"> *</em> +<a name="117" href="#117">117</a> <em class="jxr_javadoccomment"> * @param token The BinarySecurity instance corresponding to either X509Security or </em> +<a name="118" href="#118">118</a> <em class="jxr_javadoccomment"> * PKIPathSecurity</em> +<a name="119" href="#119">119</a> <em class="jxr_javadoccomment"> * @return The X509Certificates associated with this reference</em> +<a name="120" href="#120">120</a> <em class="jxr_javadoccomment"> * @throws WSSecurityException</em> +<a name="121" href="#121">121</a> <em class="jxr_javadoccomment"> */</em> +<a name="122" href="#122">122</a> <strong class="jxr_keyword">private</strong> X509Certificate[] getCertificatesTokenReference(<a href="../../../../../org/apache/ws/security/message/token/BinarySecurity.html">BinarySecurity</a> token, <a href="../../../../../org/apache/ws/security/components/crypto/Crypto.html">Crypto</a> crypto) +<a name="123" href="#123">123</a> <strong class="jxr_keyword">throws</strong> <a href="../../../../../org/apache/ws/security/WSSecurityException.html">WSSecurityException</a> { +<a name="124" href="#124">124</a> <strong class="jxr_keyword">if</strong> (token instanceof PKIPathSecurity) { +<a name="125" href="#125">125</a> <strong class="jxr_keyword">return</strong> ((PKIPathSecurity) token).getX509Certificates(crypto); +<a name="126" href="#126">126</a> } <strong class="jxr_keyword">else</strong> <strong class="jxr_keyword">if</strong> (token instanceof X509Security) { +<a name="127" href="#127">127</a> X509Certificate cert = ((X509Security) token).getX509Certificate(crypto); +<a name="128" href="#128">128</a> <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">new</strong> X509Certificate[]{cert}; +<a name="129" href="#129">129</a> } +<a name="130" href="#130">130</a> <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">null</strong>; +<a name="131" href="#131">131</a> } +<a name="132" href="#132">132</a> +<a name="133" href="#133">133</a> <em class="jxr_javadoccomment">/**</em> +<a name="134" href="#134">134</a> <em class="jxr_javadoccomment"> * Checks the <code>element</code> and creates appropriate binary security object.</em> +<a name="135" href="#135">135</a> <em class="jxr_javadoccomment"> *</em> +<a name="136" href="#136">136</a> <em class="jxr_javadoccomment"> * @param element The XML element that contains either a <code>BinarySecurityToken</em> +<a name="137" href="#137">137</a> <em class="jxr_javadoccomment"> * </code> or a <code>PKIPath</code> element.</em> +<a name="138" href="#138">138</a> <em class="jxr_javadoccomment"> * @param config A WSSConfig instance</em> +<a name="139" href="#139">139</a> <em class="jxr_javadoccomment"> * @return a BinarySecurity token element</em> +<a name="140" href="#140">140</a> <em class="jxr_javadoccomment"> * @throws WSSecurityException</em> +<a name="141" href="#141">141</a> <em class="jxr_javadoccomment"> */</em> +<a name="142" href="#142">142</a> <strong class="jxr_keyword">private</strong> <a href="../../../../../org/apache/ws/security/message/token/BinarySecurity.html">BinarySecurity</a> createSecurityToken( +<a name="143" href="#143">143</a> Element element, +<a name="144" href="#144">144</a> <a href="../../../../../org/apache/ws/security/WSSConfig.html">WSSConfig</a> config +<a name="145" href="#145">145</a> ) <strong class="jxr_keyword">throws</strong> <a href="../../../../../org/apache/ws/security/WSSecurityException.html">WSSecurityException</a> { +<a name="146" href="#146">146</a> String type = element.getAttribute(<span class="jxr_string">"ValueType"</span>); +<a name="147" href="#147">147</a> <a href="../../../../../org/apache/ws/security/message/token/BinarySecurity.html">BinarySecurity</a> token = <strong class="jxr_keyword">null</strong>; +<a name="148" href="#148">148</a> <strong class="jxr_keyword">if</strong> (X509Security.X509_V3_TYPE.equals(type)) { +<a name="149" href="#149">149</a> token = <strong class="jxr_keyword">new</strong> X509Security(element, config.isWsiBSPCompliant()); +<a name="150" href="#150">150</a> } <strong class="jxr_keyword">else</strong> <strong class="jxr_keyword">if</strong> (PKIPathSecurity.getType().equals(type)) { +<a name="151" href="#151">151</a> token = <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/ws/security/message/token/PKIPathSecurity.html">PKIPathSecurity</a>(element, config.isWsiBSPCompliant()); +<a name="152" href="#152">152</a> } <strong class="jxr_keyword">else</strong> <strong class="jxr_keyword">if</strong> (KerberosSecurity.isKerberosToken(type)) { +<a name="153" href="#153">153</a> token = <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/ws/security/message/token/KerberosSecurity.html">KerberosSecurity</a>(element, config.isWsiBSPCompliant()); +<a name="154" href="#154">154</a> } <strong class="jxr_keyword">else</strong> { +<a name="155" href="#155">155</a> token = <strong class="jxr_keyword">new</strong> <a href="../../../../../org/apache/ws/security/message/token/BinarySecurity.html">BinarySecurity</a>(element, config.isWsiBSPCompliant()); +<a name="156" href="#156">156</a> } +<a name="157" href="#157">157</a> <strong class="jxr_keyword">return</strong> token; +<a name="158" href="#158">158</a> } +<a name="159" href="#159">159</a> +<a name="160" href="#160">160</a> } </pre> <hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body> </html> Modified: webservices/wss4j/site/xref/org/apache/ws/security/processor/DerivedKeyTokenProcessor.html URL: http://svn.apache.org/viewvc/webservices/wss4j/site/xref/org/apache/ws/security/processor/DerivedKeyTokenProcessor.html?rev=1178426&r1=1178425&r2=1178426&view=diff ============================================================================== --- webservices/wss4j/site/xref/org/apache/ws/security/processor/DerivedKeyTokenProcessor.html (original) +++ webservices/wss4j/site/xref/org/apache/ws/security/processor/DerivedKeyTokenProcessor.html Mon Oct 3 15:15:52 2011 @@ -80,12 +80,13 @@ <a name="70" href="#70">70</a> result.put(WSSecurityEngineResult.TAG_ID, dkt.getID()); <a name="71" href="#71">71</a> result.put(WSSecurityEngineResult.TAG_DERIVED_KEY_TOKEN, dkt); <a name="72" href="#72">72</a> result.put(WSSecurityEngineResult.TAG_SECRET, secret); -<a name="73" href="#73">73</a> wsDocInfo.addResult(result); -<a name="74" href="#74">74</a> <strong class="jxr_keyword">return</strong> java.util.Collections.singletonList(result); -<a name="75" href="#75">75</a> } -<a name="76" href="#76">76</a> +<a name="73" href="#73">73</a> result.put(WSSecurityEngineResult.TAG_TOKEN_ELEMENT, dkt.getElement()); +<a name="74" href="#74">74</a> wsDocInfo.addResult(result); +<a name="75" href="#75">75</a> <strong class="jxr_keyword">return</strong> java.util.Collections.singletonList(result); +<a name="76" href="#76">76</a> } <a name="77" href="#77">77</a> -<a name="78" href="#78">78</a> } +<a name="78" href="#78">78</a> +<a name="79" href="#79">79</a> } </pre> <hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body> </html>
