ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1416918 [43/47] - in /webservices/wss4j/site: ./ apidocs/ apidocs/org/apache/ws/security/ apidocs/org/apache/ws/security/action/ apidocs/org/apache/ws/security/action/class-use/ apidocs/org/apache/ws/security/cache/ apidocs/org/apache/ws/s...
Date Tue, 04 Dec 2012 12:49:58 GMT
Modified: webservices/wss4j/site/xref/org/apache/ws/security/processor/UsernameTokenProcessor.html
URL: http://svn.apache.org/viewvc/webservices/wss4j/site/xref/org/apache/ws/security/processor/UsernameTokenProcessor.html?rev=1416918&r1=1416917&r2=1416918&view=diff
==============================================================================
--- webservices/wss4j/site/xref/org/apache/ws/security/processor/UsernameTokenProcessor.html
(original)
+++ webservices/wss4j/site/xref/org/apache/ws/security/processor/UsernameTokenProcessor.html
Tue Dec  4 12:48:10 2012
@@ -107,64 +107,65 @@
 <a name="97" href="#97">97</a>                  principal.setPasswordType(token.getPasswordType());
 <a name="98" href="#98">98</a>                  result.put(WSSecurityEngineResult.TAG_PRINCIPAL,
principal);
 <a name="99" href="#99">99</a>              }
-<a name="100" href="#100">100</a>         }
-<a name="101" href="#101">101</a>         
-<a name="102" href="#102">102</a>         wsDocInfo.addTokenElement(elem);
-<a name="103" href="#103">103</a>         wsDocInfo.addResult(result);
-<a name="104" href="#104">104</a>         <strong class="jxr_keyword">return</strong>
java.util.Collections.singletonList(result);
-<a name="105" href="#105">105</a>     }
-<a name="106" href="#106">106</a> 
-<a name="107" href="#107">107</a>     <em class="jxr_javadoccomment">/**</em>
-<a name="108" href="#108">108</a> <em class="jxr_javadoccomment">     *
Check the UsernameToken element and validate it.</em>
-<a name="109" href="#109">109</a> <em class="jxr_javadoccomment">     *</em>
-<a name="110" href="#110">110</a> <em class="jxr_javadoccomment">     *
@param token the DOM element that contains the UsernameToken</em>
-<a name="111" href="#111">111</a> <em class="jxr_javadoccomment">     *
@param data The RequestData object from which to obtain configuration</em>
-<a name="112" href="#112">112</a> <em class="jxr_javadoccomment">     *
@return a Credential object corresponding to the (validated) Username Token</em>
-<a name="113" href="#113">113</a> <em class="jxr_javadoccomment">     *
@throws WSSecurityException</em>
-<a name="114" href="#114">114</a> <em class="jxr_javadoccomment">     */</em>
-<a name="115" href="#115">115</a>     <strong class="jxr_keyword">public</strong>
<a href="../../../../../org/apache/ws/security/validate/Credential.html">Credential</a>

-<a name="116" href="#116">116</a>     handleUsernameToken(
-<a name="117" href="#117">117</a>         Element token, 
-<a name="118" href="#118">118</a>         <a href="../../../../../org/apache/ws/security/validate/Validator.html">Validator</a>
validator,
-<a name="119" href="#119">119</a>         <a href="../../../../../org/apache/ws/security/handler/RequestData.html">RequestData</a>
data
-<a name="120" href="#120">120</a>     ) <strong class="jxr_keyword">throws</strong>
<a href="../../../../../org/apache/ws/security/WSSecurityException.html">WSSecurityException</a>
{
-<a name="121" href="#121">121</a>         <strong class="jxr_keyword">boolean</strong>
allowNamespaceQualifiedPasswordTypes = false;
-<a name="122" href="#122">122</a>         <strong class="jxr_keyword">boolean</strong>
bspCompliant = <strong class="jxr_keyword">true</strong>;
-<a name="123" href="#123">123</a>         <a href="../../../../../org/apache/ws/security/WSSConfig.html">WSSConfig</a>
wssConfig = data.getWssConfig();
-<a name="124" href="#124">124</a>         <strong class="jxr_keyword">if</strong>
(wssConfig != <strong class="jxr_keyword">null</strong>) {
-<a name="125" href="#125">125</a>             allowNamespaceQualifiedPasswordTypes
= 
-<a name="126" href="#126">126</a>                 wssConfig.getAllowNamespaceQualifiedPasswordTypes();
-<a name="127" href="#127">127</a>             bspCompliant = wssConfig.isWsiBSPCompliant();
-<a name="128" href="#128">128</a>         }
-<a name="129" href="#129">129</a>         
-<a name="130" href="#130">130</a>         <em class="jxr_comment">//</em>
-<a name="131" href="#131">131</a>         <em class="jxr_comment">// Parse
and validate the UsernameToken element</em>
-<a name="132" href="#132">132</a>         <em class="jxr_comment">//</em>
-<a name="133" href="#133">133</a>         <a href="../../../../../org/apache/ws/security/message/token/UsernameToken.html">UsernameToken</a>
ut = 
-<a name="134" href="#134">134</a>             <strong class="jxr_keyword">new</strong>
<a href="../../../../../org/apache/ws/security/message/token/UsernameToken.html">UsernameToken</a>(token,
allowNamespaceQualifiedPasswordTypes, bspCompliant);
-<a name="135" href="#135">135</a>         
-<a name="136" href="#136">136</a>         <em class="jxr_comment">// Test
for replay attacks</em>
-<a name="137" href="#137">137</a>         <a href="../../../../../org/apache/ws/security/cache/ReplayCache.html">ReplayCache</a>
replayCache = data.getNonceReplayCache();
-<a name="138" href="#138">138</a>         <strong class="jxr_keyword">if</strong>
(replayCache != <strong class="jxr_keyword">null</strong> &amp;&amp; ut.getNonce()
!= <strong class="jxr_keyword">null</strong>) {
-<a name="139" href="#139">139</a>             <strong class="jxr_keyword">if</strong>
(replayCache.contains(ut.getNonce())) {
-<a name="140" href="#140">140</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="141" href="#141">141</a>                     WSSecurityException.INVALID_SECURITY,
-<a name="142" href="#142">142</a>                     <span class="jxr_string">"badUsernameToken"</span>,
-<a name="143" href="#143">143</a>                     <strong class="jxr_keyword">new</strong>
Object[] {<span class="jxr_string">"A replay attack has been detected"</span>}
-<a name="144" href="#144">144</a>                 );
-<a name="145" href="#145">145</a>             }
-<a name="146" href="#146">146</a>             replayCache.add(ut.getNonce());
-<a name="147" href="#147">147</a>         }
-<a name="148" href="#148">148</a>         
-<a name="149" href="#149">149</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="150" href="#150">150</a>         credential.setUsernametoken(ut);
-<a name="151" href="#151">151</a>         <strong class="jxr_keyword">if</strong>
(validator != <strong class="jxr_keyword">null</strong>) {
-<a name="152" href="#152">152</a>             <strong class="jxr_keyword">return</strong>
validator.validate(credential, data);
-<a name="153" href="#153">153</a>         }
-<a name="154" href="#154">154</a>         <strong class="jxr_keyword">return</strong>
credential;
-<a name="155" href="#155">155</a>     }
-<a name="156" href="#156">156</a> 
-<a name="157" href="#157">157</a> }
+<a name="100" href="#100">100</a>             result.put(WSSecurityEngineResult.TAG_SUBJECT,
credential.getSubject());
+<a name="101" href="#101">101</a>         }
+<a name="102" href="#102">102</a>         
+<a name="103" href="#103">103</a>         wsDocInfo.addTokenElement(elem);
+<a name="104" href="#104">104</a>         wsDocInfo.addResult(result);
+<a name="105" href="#105">105</a>         <strong class="jxr_keyword">return</strong>
java.util.Collections.singletonList(result);
+<a name="106" href="#106">106</a>     }
+<a name="107" href="#107">107</a> 
+<a name="108" href="#108">108</a>     <em class="jxr_javadoccomment">/**</em>
+<a name="109" href="#109">109</a> <em class="jxr_javadoccomment">     *
Check the UsernameToken element and validate it.</em>
+<a name="110" href="#110">110</a> <em class="jxr_javadoccomment">     *</em>
+<a name="111" href="#111">111</a> <em class="jxr_javadoccomment">     *
@param token the DOM element that contains the UsernameToken</em>
+<a name="112" href="#112">112</a> <em class="jxr_javadoccomment">     *
@param data The RequestData object from which to obtain configuration</em>
+<a name="113" href="#113">113</a> <em class="jxr_javadoccomment">     *
@return a Credential object corresponding to the (validated) Username Token</em>
+<a name="114" href="#114">114</a> <em class="jxr_javadoccomment">     *
@throws WSSecurityException</em>
+<a name="115" href="#115">115</a> <em class="jxr_javadoccomment">     */</em>
+<a name="116" href="#116">116</a>     <strong class="jxr_keyword">public</strong>
<a href="../../../../../org/apache/ws/security/validate/Credential.html">Credential</a>

+<a name="117" href="#117">117</a>     handleUsernameToken(
+<a name="118" href="#118">118</a>         Element token, 
+<a name="119" href="#119">119</a>         <a href="../../../../../org/apache/ws/security/validate/Validator.html">Validator</a>
validator,
+<a name="120" href="#120">120</a>         <a href="../../../../../org/apache/ws/security/handler/RequestData.html">RequestData</a>
data
+<a name="121" href="#121">121</a>     ) <strong class="jxr_keyword">throws</strong>
<a href="../../../../../org/apache/ws/security/WSSecurityException.html">WSSecurityException</a>
{
+<a name="122" href="#122">122</a>         <strong class="jxr_keyword">boolean</strong>
allowNamespaceQualifiedPasswordTypes = false;
+<a name="123" href="#123">123</a>         <strong class="jxr_keyword">boolean</strong>
bspCompliant = <strong class="jxr_keyword">true</strong>;
+<a name="124" href="#124">124</a>         <a href="../../../../../org/apache/ws/security/WSSConfig.html">WSSConfig</a>
wssConfig = data.getWssConfig();
+<a name="125" href="#125">125</a>         <strong class="jxr_keyword">if</strong>
(wssConfig != <strong class="jxr_keyword">null</strong>) {
+<a name="126" href="#126">126</a>             allowNamespaceQualifiedPasswordTypes
= 
+<a name="127" href="#127">127</a>                 wssConfig.getAllowNamespaceQualifiedPasswordTypes();
+<a name="128" href="#128">128</a>             bspCompliant = wssConfig.isWsiBSPCompliant();
+<a name="129" href="#129">129</a>         }
+<a name="130" href="#130">130</a>         
+<a name="131" href="#131">131</a>         <em class="jxr_comment">//</em>
+<a name="132" href="#132">132</a>         <em class="jxr_comment">// Parse
and validate the UsernameToken element</em>
+<a name="133" href="#133">133</a>         <em class="jxr_comment">//</em>
+<a name="134" href="#134">134</a>         <a href="../../../../../org/apache/ws/security/message/token/UsernameToken.html">UsernameToken</a>
ut = 
+<a name="135" href="#135">135</a>             <strong class="jxr_keyword">new</strong>
<a href="../../../../../org/apache/ws/security/message/token/UsernameToken.html">UsernameToken</a>(token,
allowNamespaceQualifiedPasswordTypes, bspCompliant);
+<a name="136" href="#136">136</a>         
+<a name="137" href="#137">137</a>         <em class="jxr_comment">// Test
for replay attacks</em>
+<a name="138" href="#138">138</a>         <a href="../../../../../org/apache/ws/security/cache/ReplayCache.html">ReplayCache</a>
replayCache = data.getNonceReplayCache();
+<a name="139" href="#139">139</a>         <strong class="jxr_keyword">if</strong>
(replayCache != <strong class="jxr_keyword">null</strong> &amp;&amp; ut.getNonce()
!= <strong class="jxr_keyword">null</strong>) {
+<a name="140" href="#140">140</a>             <strong class="jxr_keyword">if</strong>
(replayCache.contains(ut.getNonce())) {
+<a name="141" href="#141">141</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="142" href="#142">142</a>                     WSSecurityException.INVALID_SECURITY,
+<a name="143" href="#143">143</a>                     <span class="jxr_string">"badUsernameToken"</span>,
+<a name="144" href="#144">144</a>                     <strong class="jxr_keyword">new</strong>
Object[] {<span class="jxr_string">"A replay attack has been detected"</span>}
+<a name="145" href="#145">145</a>                 );
+<a name="146" href="#146">146</a>             }
+<a name="147" href="#147">147</a>             replayCache.add(ut.getNonce());
+<a name="148" href="#148">148</a>         }
+<a name="149" href="#149">149</a>         
+<a name="150" href="#150">150</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="151" href="#151">151</a>         credential.setUsernametoken(ut);
+<a name="152" href="#152">152</a>         <strong class="jxr_keyword">if</strong>
(validator != <strong class="jxr_keyword">null</strong>) {
+<a name="153" href="#153">153</a>             <strong class="jxr_keyword">return</strong>
validator.validate(credential, data);
+<a name="154" href="#154">154</a>         }
+<a name="155" href="#155">155</a>         <strong class="jxr_keyword">return</strong>
credential;
+<a name="156" href="#156">156</a>     }
+<a name="157" href="#157">157</a> 
+<a name="158" href="#158">158</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/package-frame.html
URL: http://svn.apache.org/viewvc/webservices/wss4j/site/xref/org/apache/ws/security/processor/package-frame.html?rev=1416918&r1=1416917&r2=1416918&view=diff
==============================================================================
--- webservices/wss4j/site/xref/org/apache/ws/security/processor/package-frame.html (original)
+++ webservices/wss4j/site/xref/org/apache/ws/security/processor/package-frame.html Tue Dec
 4 12:48:10 2012
@@ -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.7 Reference Package org.apache.ws.security.processor</title>
+		<title>Apache WSS4J 1.6.8 Reference Package org.apache.ws.security.processor</title>
 		<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="style"
/>
 	</head>
 	<body>

Modified: webservices/wss4j/site/xref/org/apache/ws/security/processor/package-summary.html
URL: http://svn.apache.org/viewvc/webservices/wss4j/site/xref/org/apache/ws/security/processor/package-summary.html?rev=1416918&r1=1416917&r2=1416918&view=diff
==============================================================================
--- webservices/wss4j/site/xref/org/apache/ws/security/processor/package-summary.html (original)
+++ webservices/wss4j/site/xref/org/apache/ws/security/processor/package-summary.html Tue
Dec  4 12:48:10 2012
@@ -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.7 Reference Package org.apache.ws.security.processor</title>
+		<title>Apache WSS4J 1.6.8 Reference Package org.apache.ws.security.processor</title>
 		<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="style"
/>
 	</head>
 	<body>



Mime
View raw message