ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gi...@apache.org
Subject svn commit: r1463136 [10/11] - in /webservices/wss4j/trunk: cxf-integration/src/main/java/org/apache/wss4j/cxfIntegration/interceptor/ integration/src/test/java/org/apache/wss4j/integration/test/stax/ ws-security-common/src/main/java/org/apache/wss4j/c...
Date Mon, 01 Apr 2013 13:57:35 GMT
Added: webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/X509TokenSecurityEvent.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/X509TokenSecurityEvent.java?rev=1463136&view=auto
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/X509TokenSecurityEvent.java (added)
+++ webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/X509TokenSecurityEvent.java Mon Apr  1 13:57:32 2013
@@ -0,0 +1,29 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.wss4j.stax.securityEvent;
+
+import org.apache.wss4j.stax.securityToken.X509SecurityToken;
+import org.apache.xml.security.stax.securityEvent.TokenSecurityEvent;
+
+public class X509TokenSecurityEvent extends TokenSecurityEvent<X509SecurityToken> {
+
+    public X509TokenSecurityEvent() {
+        super(WSSecurityEventConstants.X509Token);
+    }
+}

Propchange: webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityEvent/X509TokenSecurityEvent.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/DsaKeyValueSecurityToken.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/DsaKeyValueSecurityToken.java?rev=1463136&view=auto
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/DsaKeyValueSecurityToken.java (added)
+++ webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/DsaKeyValueSecurityToken.java Mon Apr  1 13:57:32 2013
@@ -0,0 +1,22 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.wss4j.stax.securityToken;
+
+public interface DsaKeyValueSecurityToken extends KeyValueSecurityToken {
+}

Propchange: webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/DsaKeyValueSecurityToken.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/ECKeyValueSecurityToken.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/ECKeyValueSecurityToken.java?rev=1463136&view=auto
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/ECKeyValueSecurityToken.java (added)
+++ webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/ECKeyValueSecurityToken.java Mon Apr  1 13:57:32 2013
@@ -0,0 +1,22 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.wss4j.stax.securityToken;
+
+public interface ECKeyValueSecurityToken extends KeyValueSecurityToken {
+}

Propchange: webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/ECKeyValueSecurityToken.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/HttpsSecurityToken.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/HttpsSecurityToken.java?rev=1463136&view=auto
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/HttpsSecurityToken.java (added)
+++ webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/HttpsSecurityToken.java Mon Apr  1 13:57:32 2013
@@ -0,0 +1,25 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.wss4j.stax.securityToken;
+
+
+import org.apache.xml.security.stax.securityToken.InboundSecurityToken;
+
+public interface HttpsSecurityToken extends SubjectAndPrincipalSecurityToken, InboundSecurityToken {
+}

Propchange: webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/HttpsSecurityToken.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/KerberosServiceSecurityToken.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/KerberosServiceSecurityToken.java?rev=1463136&view=auto
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/KerberosServiceSecurityToken.java (added)
+++ webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/KerberosServiceSecurityToken.java Mon Apr  1 13:57:32 2013
@@ -0,0 +1,26 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.wss4j.stax.securityToken;
+
+public interface KerberosServiceSecurityToken extends SubjectAndPrincipalSecurityToken {
+
+    public byte[] getBinaryContent();
+
+    public String getKerberosTokenValueType();
+}

Propchange: webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/KerberosServiceSecurityToken.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/KeyValueSecurityToken.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/KeyValueSecurityToken.java?rev=1463136&view=auto
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/KeyValueSecurityToken.java (added)
+++ webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/KeyValueSecurityToken.java Mon Apr  1 13:57:32 2013
@@ -0,0 +1,22 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.wss4j.stax.securityToken;
+
+public interface KeyValueSecurityToken extends SubjectAndPrincipalSecurityToken {
+}

Propchange: webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/KeyValueSecurityToken.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/RsaKeyValueSecurityToken.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/RsaKeyValueSecurityToken.java?rev=1463136&view=auto
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/RsaKeyValueSecurityToken.java (added)
+++ webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/RsaKeyValueSecurityToken.java Mon Apr  1 13:57:32 2013
@@ -0,0 +1,22 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.wss4j.stax.securityToken;
+
+public interface RsaKeyValueSecurityToken extends KeyValueSecurityToken {
+}

Propchange: webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/RsaKeyValueSecurityToken.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/SamlSecurityToken.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/SamlSecurityToken.java?rev=1463136&view=auto
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/SamlSecurityToken.java (added)
+++ webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/SamlSecurityToken.java Mon Apr  1 13:57:32 2013
@@ -0,0 +1,22 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.wss4j.stax.securityToken;
+
+public interface SamlSecurityToken extends SubjectAndPrincipalSecurityToken {
+}

Propchange: webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/SamlSecurityToken.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/SecureConversationSecurityToken.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/SecureConversationSecurityToken.java?rev=1463136&view=auto
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/SecureConversationSecurityToken.java (added)
+++ webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/SecureConversationSecurityToken.java Mon Apr  1 13:57:32 2013
@@ -0,0 +1,24 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.wss4j.stax.securityToken;
+
+import org.apache.xml.security.stax.securityToken.SecurityToken;
+
+public interface SecureConversationSecurityToken extends SecurityToken {
+}

Propchange: webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/SecureConversationSecurityToken.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/SecurityTokenReference.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/SecurityTokenReference.java?rev=1463136&view=auto
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/SecurityTokenReference.java (added)
+++ webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/SecurityTokenReference.java Mon Apr  1 13:57:32 2013
@@ -0,0 +1,29 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.wss4j.stax.securityToken;
+
+import org.apache.xml.security.stax.ext.stax.XMLSecEvent;
+import org.apache.xml.security.stax.securityToken.SecurityToken;
+
+import java.util.Deque;
+
+public interface SecurityTokenReference extends SecurityToken {
+
+    public Deque<XMLSecEvent> getXmlSecEvents();
+}

Propchange: webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/SecurityTokenReference.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/SubjectAndPrincipalSecurityToken.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/SubjectAndPrincipalSecurityToken.java?rev=1463136&view=auto
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/SubjectAndPrincipalSecurityToken.java (added)
+++ webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/SubjectAndPrincipalSecurityToken.java Mon Apr  1 13:57:32 2013
@@ -0,0 +1,32 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.wss4j.stax.securityToken;
+
+import org.apache.wss4j.common.ext.WSSecurityException;
+import org.apache.xml.security.stax.securityToken.SecurityToken;
+
+import javax.security.auth.Subject;
+import java.security.Principal;
+
+public interface SubjectAndPrincipalSecurityToken extends SecurityToken {
+
+    public Subject getSubject() throws WSSecurityException;
+
+    public Principal getPrincipal() throws WSSecurityException;
+}

Propchange: webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/SubjectAndPrincipalSecurityToken.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/UsernameSecurityToken.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/UsernameSecurityToken.java?rev=1463136&view=auto
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/UsernameSecurityToken.java (added)
+++ webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/UsernameSecurityToken.java Mon Apr  1 13:57:32 2013
@@ -0,0 +1,41 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.wss4j.stax.securityToken;
+
+import org.apache.wss4j.common.ext.WSSecurityException;
+import org.apache.wss4j.stax.ext.WSSConstants;
+
+public interface UsernameSecurityToken extends SubjectAndPrincipalSecurityToken {
+
+    byte[] generateDerivedKey() throws WSSecurityException;
+
+    WSSConstants.UsernameTokenPasswordType getUsernameTokenPasswordType();
+
+    String getCreatedTime();
+
+    String getPassword();
+
+    String getUsername();
+
+    String getNonce();
+
+    byte[] getSalt();
+
+    Long getIteration();
+}

Propchange: webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/UsernameSecurityToken.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/WSSecurityTokenConstants.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/WSSecurityTokenConstants.java?rev=1463136&view=auto
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/WSSecurityTokenConstants.java (added)
+++ webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/WSSecurityTokenConstants.java Mon Apr  1 13:57:32 2013
@@ -0,0 +1,59 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.wss4j.stax.securityToken;
+
+
+import org.apache.xml.security.stax.securityToken.SecurityTokenConstants;
+
+public class WSSecurityTokenConstants extends SecurityTokenConstants {
+
+    public static final TokenUsage TokenUsage_MainSignature = new TokenUsage("MainSignature");
+    public static final TokenUsage TokenUsage_MainEncryption = new TokenUsage("MainEncryption");
+    public static final TokenUsage TokenUsage_SupportingTokens = new TokenUsage("SupportingTokens");
+    public static final TokenUsage TokenUsage_SignedSupportingTokens = new TokenUsage("SignedSupportingTokens");
+    public static final TokenUsage TokenUsage_EndorsingSupportingTokens = new TokenUsage("EndorsingSupportingTokens");
+    public static final TokenUsage TokenUsage_SignedEndorsingSupportingTokens = new TokenUsage("SignedEndorsingSupportingTokens");
+    public static final TokenUsage TokenUsage_SignedEncryptedSupportingTokens = new TokenUsage("SignedEncryptedSupportingTokens");
+    public static final TokenUsage TokenUsage_EncryptedSupportingTokens = new TokenUsage("EncryptedSupportingTokens");
+    public static final TokenUsage TokenUsage_EndorsingEncryptedSupportingTokens = new TokenUsage("EndorsingEncryptedSupportingTokens");
+    public static final TokenUsage TokenUsage_SignedEndorsingEncryptedSupportingTokens = new TokenUsage("SignedEndorsingEncryptedSupportingTokens");
+
+    //todo correct/cleanup/rename/revisit KeyIdentifierTypes over the whole framework. I messed it up...
+    public static final KeyIdentifier KeyIdentifier_IssuerSerial = new KeyIdentifier("IssuerSerial");
+    public static final KeyIdentifier KeyIdentifier_SecurityTokenDirectReference = new KeyIdentifier("SecurityTokenDirectReference");
+    public static final KeyIdentifier KeyIdentifier_X509KeyIdentifier = new KeyIdentifier("X509KeyIdentifier");
+    public static final KeyIdentifier KeyIdentifier_SkiKeyIdentifier = new KeyIdentifier("SkiKeyIdentifier");
+    public static final KeyIdentifier KeyIdentifier_ThumbprintIdentifier = new KeyIdentifier("ThumbprintIdentifier");
+    public static final KeyIdentifier KeyIdentifier_EmbeddedKeyIdentifierRef = new KeyIdentifier("EmbeddedKeyIdentifierRef");
+    public static final KeyIdentifier KeyIdentifier_UsernameTokenReference = new KeyIdentifier("UsernameTokenReference");
+    public static final KeyIdentifier KeyIdentifier_SecurityTokenReference = new KeyIdentifier("SecurityTokenReference");
+
+    public static final TokenType UsernameToken = new TokenType("UsernameToken");
+    public static final TokenType SecurityContextToken = new TokenType("SecurityContextToken");
+    public static final TokenType Saml10Token = new TokenType("Saml10Token");
+    public static final TokenType Saml11Token = new TokenType("Saml11Token");
+    public static final TokenType Saml20Token = new TokenType("Saml20Token");
+    public static final TokenType IssuedToken = new TokenType("IssuedToken");
+    public static final TokenType SecureConversationToken = new TokenType("SecureConversationToken");
+    public static final TokenType HttpsToken = new TokenType("HttpsToken");
+    public static final TokenType KerberosToken = new TokenType("KerberosToken");
+    public static final TokenType SpnegoContextToken = new TokenType("SpnegoContextToken");
+    public static final TokenType RelToken = new TokenType("RelToken");
+    public static final TokenType DerivedKeyToken = new TokenType("DerivedKeyToken");
+}

Propchange: webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/WSSecurityTokenConstants.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/X509SecurityToken.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/X509SecurityToken.java?rev=1463136&view=auto
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/X509SecurityToken.java (added)
+++ webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/X509SecurityToken.java Mon Apr  1 13:57:32 2013
@@ -0,0 +1,22 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.wss4j.stax.securityToken;
+
+public interface X509SecurityToken extends SubjectAndPrincipalSecurityToken {
+}

Propchange: webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/securityToken/X509SecurityToken.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/validate/BinarySecurityTokenValidator.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/validate/BinarySecurityTokenValidator.java?rev=1463136&r1=1463135&r2=1463136&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/validate/BinarySecurityTokenValidator.java (original)
+++ webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/validate/BinarySecurityTokenValidator.java Mon Apr  1 13:57:32 2013
@@ -20,7 +20,7 @@ package org.apache.wss4j.stax.validate;
 
 import org.apache.wss4j.binding.wss10.BinarySecurityTokenType;
 import org.apache.wss4j.common.ext.WSSecurityException;
-import org.apache.wss4j.stax.ext.InboundSecurityToken;
+import org.apache.xml.security.stax.securityToken.InboundSecurityToken;
 
 public interface BinarySecurityTokenValidator extends Validator {
 

Modified: webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/validate/BinarySecurityTokenValidatorImpl.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/validate/BinarySecurityTokenValidatorImpl.java?rev=1463136&r1=1463135&r2=1463136&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/validate/BinarySecurityTokenValidatorImpl.java (original)
+++ webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/validate/BinarySecurityTokenValidatorImpl.java Mon Apr  1 13:57:32 2013
@@ -22,14 +22,15 @@ import org.apache.commons.codec.binary.B
 import org.apache.wss4j.binding.wss10.BinarySecurityTokenType;
 import org.apache.wss4j.common.crypto.Crypto;
 import org.apache.wss4j.common.ext.WSSecurityException;
-import org.apache.wss4j.stax.ext.InboundSecurityToken;
 import org.apache.wss4j.stax.ext.WSSConfigurationException;
 import org.apache.wss4j.stax.ext.WSSConstants;
 import org.apache.wss4j.stax.ext.WSSSecurityProperties;
-import org.apache.wss4j.stax.impl.securityToken.KerberosServiceSecurityToken;
-import org.apache.wss4j.stax.impl.securityToken.X509PKIPathv1SecurityToken;
-import org.apache.wss4j.stax.impl.securityToken.X509_V3SecurityToken;
+import org.apache.wss4j.stax.securityToken.WSSecurityTokenConstants;
+import org.apache.wss4j.stax.impl.securityToken.KerberosServiceSecurityTokenImpl;
+import org.apache.wss4j.stax.impl.securityToken.X509PKIPathv1SecurityTokenImpl;
+import org.apache.wss4j.stax.impl.securityToken.X509_V3SecurityTokenImpl;
 import org.apache.xml.security.exceptions.XMLSecurityException;
+import org.apache.xml.security.stax.securityToken.InboundSecurityToken;
 
 public class BinarySecurityTokenValidatorImpl implements BinarySecurityTokenValidator {
 
@@ -53,12 +54,12 @@ public class BinarySecurityTokenValidato
         try {
             if (WSSConstants.NS_X509_V3_TYPE.equals(binarySecurityTokenType.getValueType())) {
                 Crypto crypto = getCrypto(tokenContext.getWssSecurityProperties());
-                X509_V3SecurityToken x509V3SecurityToken = new X509_V3SecurityToken(
+                X509_V3SecurityTokenImpl x509V3SecurityToken = new X509_V3SecurityTokenImpl(
                         tokenContext.getWsSecurityContext(),
                         crypto,
                         tokenContext.getWssSecurityProperties().getCallbackHandler(),
                         securityTokenData, binarySecurityTokenType.getId(),
-                        WSSConstants.WSSKeyIdentifierType.SECURITY_TOKEN_DIRECT_REFERENCE,
+                        WSSecurityTokenConstants.KeyIdentifier_SecurityTokenDirectReference,
                         tokenContext.getWssSecurityProperties()
                 );
                 x509V3SecurityToken.setElementPath(tokenContext.getElementPath());
@@ -66,24 +67,24 @@ public class BinarySecurityTokenValidato
                 return x509V3SecurityToken;
             } else if (WSSConstants.NS_X509PKIPathv1.equals(binarySecurityTokenType.getValueType())) {
                 Crypto crypto = getCrypto(tokenContext.getWssSecurityProperties());
-                X509PKIPathv1SecurityToken x509PKIPathv1SecurityToken = new X509PKIPathv1SecurityToken(
+                X509PKIPathv1SecurityTokenImpl x509PKIPathv1SecurityToken = new X509PKIPathv1SecurityTokenImpl(
                         tokenContext.getWsSecurityContext(),
                         crypto,
                         tokenContext.getWssSecurityProperties().getCallbackHandler(),
                         securityTokenData, binarySecurityTokenType.getId(),
-                        WSSConstants.WSSKeyIdentifierType.SECURITY_TOKEN_DIRECT_REFERENCE,
+                        WSSecurityTokenConstants.KeyIdentifier_SecurityTokenDirectReference,
                         tokenContext.getWssSecurityProperties()
                 );
                 x509PKIPathv1SecurityToken.setElementPath(tokenContext.getElementPath());
                 x509PKIPathv1SecurityToken.setXMLSecEvent(tokenContext.getFirstXMLSecEvent());
                 return x509PKIPathv1SecurityToken;
             } else if (WSSConstants.NS_GSS_Kerberos5_AP_REQ.equals(binarySecurityTokenType.getValueType())) {
-                KerberosServiceSecurityToken kerberosServiceSecurityToken = new KerberosServiceSecurityToken(
+                KerberosServiceSecurityTokenImpl kerberosServiceSecurityToken = new KerberosServiceSecurityTokenImpl(
                         tokenContext.getWsSecurityContext(),
                         tokenContext.getWssSecurityProperties().getCallbackHandler(),
                         securityTokenData, binarySecurityTokenType.getValueType(),
                         binarySecurityTokenType.getId(),
-                        WSSConstants.WSSKeyIdentifierType.SECURITY_TOKEN_DIRECT_REFERENCE
+                        WSSecurityTokenConstants.KeyIdentifier_SecurityTokenDirectReference
                 );
                 kerberosServiceSecurityToken.setElementPath(tokenContext.getElementPath());
                 kerberosServiceSecurityToken.setXMLSecEvent(tokenContext.getFirstXMLSecEvent());

Copied: webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/validate/JAASUsernameTokenValidatorImpl.java (from r1460765, webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/validate/JAASUsernameTokenValidator.java)
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/validate/JAASUsernameTokenValidatorImpl.java?p2=webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/validate/JAASUsernameTokenValidatorImpl.java&p1=webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/validate/JAASUsernameTokenValidator.java&r1=1460765&r2=1463136&rev=1463136&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/validate/JAASUsernameTokenValidator.java (original)
+++ webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/validate/JAASUsernameTokenValidatorImpl.java Mon Apr  1 13:57:32 2013
@@ -18,36 +18,32 @@
  */
 package org.apache.wss4j.stax.validate;
 
-import java.io.UnsupportedEncodingException;
-
 import javax.security.auth.Subject;
 import javax.security.auth.callback.CallbackHandler;
 import javax.security.auth.login.LoginContext;
 import javax.security.auth.login.LoginException;
 
-import org.apache.commons.codec.binary.Base64;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.wss4j.binding.wss10.AttributedString;
 import org.apache.wss4j.binding.wss10.EncodedString;
 import org.apache.wss4j.binding.wss10.PasswordString;
 import org.apache.wss4j.binding.wss10.UsernameTokenType;
 import org.apache.wss4j.binding.wsu10.AttributedDateTime;
 import org.apache.wss4j.common.NamePasswordCallbackHandler;
 import org.apache.wss4j.common.ext.WSSecurityException;
-import org.apache.wss4j.common.principal.WSUsernameTokenPrincipal;
-import org.apache.wss4j.stax.ext.InboundSecurityToken;
 import org.apache.wss4j.stax.ext.WSSConstants;
-import org.apache.wss4j.stax.impl.securityToken.UsernameSecurityToken;
+import org.apache.wss4j.stax.securityToken.UsernameSecurityToken;
+import org.apache.wss4j.stax.securityToken.WSSecurityTokenConstants;
+import org.apache.wss4j.stax.impl.securityToken.UsernameSecurityTokenImpl;
 import org.apache.xml.security.stax.ext.XMLSecurityUtils;
+import org.apache.xml.security.stax.securityToken.InboundSecurityToken;
 
 /**
  * This class validates a processed UsernameToken, where Username/password validation is delegated
  * to the JAAS LoginContext.
  */
-public class JAASUsernameTokenValidator implements UsernameTokenValidator {
-    
-    private static final transient Log log = LogFactory.getLog(JAASUsernameTokenValidator.class);
+public class JAASUsernameTokenValidatorImpl implements UsernameTokenValidator {
+
+    private static final transient org.slf4j.Logger log =
+            org.slf4j.LoggerFactory.getLogger(JAASUsernameTokenValidatorImpl.class);
     
     private String contextName = null;
     
@@ -60,7 +56,8 @@ public class JAASUsernameTokenValidator 
     }
 
     @Override
-    public InboundSecurityToken validate(UsernameTokenType usernameTokenType, TokenContext tokenContext) throws WSSecurityException {
+    public <T extends UsernameSecurityToken & InboundSecurityToken> T validate(
+            UsernameTokenType usernameTokenType, TokenContext tokenContext) throws WSSecurityException {
 
         PasswordString passwordType = XMLSecurityUtils.getQNameType(usernameTokenType.getAny(), WSSConstants.TAG_wsse_Password);
         WSSConstants.UsernameTokenPasswordType usernameTokenPasswordType = WSSConstants.UsernameTokenPasswordType.PASSWORD_NONE;
@@ -74,25 +71,24 @@ public class JAASUsernameTokenValidator 
             throw new WSSecurityException(WSSecurityException.ErrorCode.FAILED_AUTHENTICATION);    
         }
         
-        final AttributedString username = usernameTokenType.getUsername();
-        String user = null;
-        if (username != null) {
-            user = username.getValue();
+        String username = null;
+        if (usernameTokenType.getUsername() != null) {
+            username = usernameTokenType.getUsername().getValue();
         }
         String password = null;
         if (passwordType != null) {
             password = passwordType.getValue();
         }
-        
-        if (!(user != null && user.length() > 0 && password != null && password.length() > 0)) {
+
+        if (username == null || username.isEmpty() || password == null || password.isEmpty()) {
             log.warn("User or password empty");
             throw new WSSecurityException(WSSecurityException.ErrorCode.FAILED_AUTHENTICATION);
         }
 
         Subject subject;
         try {
-            CallbackHandler handler = getCallbackHandler(user, password);  
-            LoginContext ctx = new LoginContext(getContextName(), handler);  
+            CallbackHandler handler = getCallbackHandler(username, password);
+            LoginContext ctx = new LoginContext(getContextName(), handler);
             ctx.login();
             subject = ctx.getSubject();
         } catch (LoginException ex) {
@@ -101,42 +97,27 @@ public class JAASUsernameTokenValidator 
                 WSSecurityException.ErrorCode.FAILED_AUTHENTICATION, ex
             );
         }
-        
-        UsernameSecurityToken usernameSecurityToken = new UsernameSecurityToken(
-                username.getValue(), password, null, null, null, 0L,
+
+        final EncodedString encodedNonce =
+                XMLSecurityUtils.getQNameType(usernameTokenType.getAny(), WSSConstants.TAG_wsse_Nonce);
+
+        final AttributedDateTime attributedDateTimeCreated =
+                XMLSecurityUtils.getQNameType(usernameTokenType.getAny(), WSSConstants.TAG_wsu_Created);
+
+        UsernameSecurityTokenImpl usernameSecurityToken = new UsernameSecurityTokenImpl(
+                usernameTokenPasswordType, username, password,
+                attributedDateTimeCreated != null ? attributedDateTimeCreated.getValue() : null,
+                encodedNonce != null ? encodedNonce.getValue() : null,
+                null, null,
                 tokenContext.getWsSecurityContext(), usernameTokenType.getId(),
-                WSSConstants.WSSKeyIdentifierType.SECURITY_TOKEN_DIRECT_REFERENCE);
+                WSSecurityTokenConstants.KeyIdentifier_SecurityTokenDirectReference);
         usernameSecurityToken.setElementPath(tokenContext.getElementPath());
         usernameSecurityToken.setXMLSecEvent(tokenContext.getFirstXMLSecEvent());
         usernameSecurityToken.setSubject(subject);
-        
-        WSUsernameTokenPrincipal principal = 
-            new WSUsernameTokenPrincipal(username.getValue(), false);
-        final EncodedString encodedNonce =
-            XMLSecurityUtils.getQNameType(usernameTokenType.getAny(), WSSConstants.TAG_wsse_Nonce);
-        if (encodedNonce != null) {
-            byte[] nonceVal = Base64.decodeBase64(encodedNonce.getValue());
-            try {
-                principal.setNonce(new String(nonceVal, "UTF-8"));
-            } catch (UnsupportedEncodingException e) {
-                throw new WSSecurityException(WSSecurityException.ErrorCode.FAILED_AUTHENTICATION, e);
-            }
-        }
-        
-        principal.setPassword(password);
-        final AttributedDateTime attributedDateTimeCreated =
-            XMLSecurityUtils.getQNameType(usernameTokenType.getAny(), WSSConstants.TAG_wsu_Created);
-        if (attributedDateTimeCreated != null) {
-            String created = attributedDateTimeCreated.getValue();
-            principal.setCreatedTime(created);
-        }
-        
-        if (passwordType != null && passwordType.getType() != null) {
-            principal.setPasswordType(passwordType.getType().toString());
-        }
-        usernameSecurityToken.setPrincipal(principal);
 
-        return usernameSecurityToken;
+        @SuppressWarnings("unchecked")
+        T token = (T)usernameSecurityToken;
+        return token;
     }
     
     protected CallbackHandler getCallbackHandler(String name, String password) {

Modified: webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/validate/SamlTokenValidator.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/validate/SamlTokenValidator.java?rev=1463136&r1=1463135&r2=1463136&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/validate/SamlTokenValidator.java (original)
+++ webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/validate/SamlTokenValidator.java Mon Apr  1 13:57:32 2013
@@ -20,12 +20,12 @@ package org.apache.wss4j.stax.validate;
 
 import org.apache.wss4j.common.ext.WSSecurityException;
 import org.apache.wss4j.common.saml.SamlAssertionWrapper;
-import org.apache.wss4j.stax.ext.InboundSecurityToken;
-import org.apache.xml.security.stax.ext.SecurityToken;
+import org.apache.wss4j.stax.securityToken.SamlSecurityToken;
+import org.apache.xml.security.stax.securityToken.InboundSecurityToken;
 
 public interface SamlTokenValidator extends SignatureTokenValidator {
 
-    InboundSecurityToken validate(
-            SamlAssertionWrapper samlAssertionWrapper, SecurityToken subjectSecurityToken,
+    public <T extends SamlSecurityToken & InboundSecurityToken> T validate(
+            SamlAssertionWrapper samlAssertionWrapper, InboundSecurityToken subjectSecurityToken,
             TokenContext tokenContext) throws WSSecurityException;
 }

Modified: webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/validate/SamlTokenValidatorImpl.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/validate/SamlTokenValidatorImpl.java?rev=1463136&r1=1463135&r2=1463136&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/validate/SamlTokenValidatorImpl.java (original)
+++ webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/validate/SamlTokenValidatorImpl.java Mon Apr  1 13:57:32 2013
@@ -20,10 +20,9 @@ package org.apache.wss4j.stax.validate;
 
 import org.apache.wss4j.common.ext.WSSecurityException;
 import org.apache.wss4j.common.saml.SamlAssertionWrapper;
-import org.apache.wss4j.stax.ext.InboundSecurityToken;
-import org.apache.wss4j.stax.impl.securityToken.InboundSecurityTokenImpl;
-import org.apache.wss4j.stax.impl.securityToken.SAMLSecurityToken;
-import org.apache.xml.security.stax.ext.SecurityToken;
+import org.apache.wss4j.stax.securityToken.SamlSecurityToken;
+import org.apache.wss4j.stax.impl.securityToken.SamlSecurityTokenImpl;
+import org.apache.xml.security.stax.securityToken.InboundSecurityToken;
 
 public class SamlTokenValidatorImpl extends SignatureTokenValidatorImpl implements SamlTokenValidator {
     
@@ -64,24 +63,26 @@ public class SamlTokenValidatorImpl exte
     }
 
     @Override
-    public InboundSecurityToken validate(final SamlAssertionWrapper samlAssertionWrapper,
-                                                 final SecurityToken subjectSecurityToken,
+    public <T extends SamlSecurityToken & InboundSecurityToken> T validate(final SamlAssertionWrapper samlAssertionWrapper,
+                                                 final InboundSecurityToken subjectSecurityToken,
                                                  final TokenContext tokenContext) throws WSSecurityException {
         // Check conditions
         checkConditions(samlAssertionWrapper);
         // Validate the assertion against schemas/profiles
         validateAssertion(samlAssertionWrapper);
 
-        InboundSecurityTokenImpl securityToken = new SAMLSecurityToken(
+        SamlSecurityTokenImpl securityToken = new SamlSecurityTokenImpl(
                 samlAssertionWrapper, subjectSecurityToken,
                 tokenContext.getWsSecurityContext(),
                 tokenContext.getWssSecurityProperties().getSignatureVerificationCrypto(),
-                samlAssertionWrapper.getId(), null,
+                null,
                 tokenContext.getWssSecurityProperties());
 
         securityToken.setElementPath(tokenContext.getElementPath());
         securityToken.setXMLSecEvent(tokenContext.getFirstXMLSecEvent());
-        return securityToken;
+        @SuppressWarnings("unchecked")
+        T token = (T)securityToken;
+        return token;
     }
 
     

Modified: webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/validate/SecurityContextTokenValidator.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/validate/SecurityContextTokenValidator.java?rev=1463136&r1=1463135&r2=1463136&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/validate/SecurityContextTokenValidator.java (original)
+++ webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/validate/SecurityContextTokenValidator.java Mon Apr  1 13:57:32 2013
@@ -20,7 +20,7 @@ package org.apache.wss4j.stax.validate;
 
 import org.apache.wss4j.binding.wssc.AbstractSecurityContextTokenType;
 import org.apache.wss4j.common.ext.WSSecurityException;
-import org.apache.wss4j.stax.ext.InboundSecurityToken;
+import org.apache.xml.security.stax.securityToken.InboundSecurityToken;
 
 public interface SecurityContextTokenValidator extends Validator {
 

Modified: webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/validate/SecurityContextTokenValidatorImpl.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/validate/SecurityContextTokenValidatorImpl.java?rev=1463136&r1=1463135&r2=1463136&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/validate/SecurityContextTokenValidatorImpl.java (original)
+++ webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/validate/SecurityContextTokenValidatorImpl.java Mon Apr  1 13:57:32 2013
@@ -21,13 +21,13 @@ package org.apache.wss4j.stax.validate;
 import org.apache.wss4j.binding.wssc.AbstractSecurityContextTokenType;
 import org.apache.wss4j.common.ext.WSPasswordCallback;
 import org.apache.wss4j.common.ext.WSSecurityException;
-import org.apache.wss4j.stax.ext.InboundSecurityToken;
-import org.apache.wss4j.stax.ext.WSSConstants;
 import org.apache.wss4j.stax.ext.WSSUtils;
-import org.apache.wss4j.stax.impl.securityToken.InboundSecurityTokenImpl;
+import org.apache.wss4j.stax.securityToken.WSSecurityTokenConstants;
 import org.apache.xml.security.exceptions.XMLSecurityException;
 import org.apache.xml.security.stax.config.JCEAlgorithmMapper;
 import org.apache.xml.security.stax.ext.XMLSecurityConstants;
+import org.apache.xml.security.stax.impl.securityToken.AbstractInboundSecurityToken;
+import org.apache.xml.security.stax.securityToken.InboundSecurityToken;
 
 import javax.crypto.spec.SecretKeySpec;
 import java.security.Key;
@@ -39,7 +39,7 @@ public class SecurityContextTokenValidat
                                                  final String identifier, final TokenContext tokenContext)
             throws WSSecurityException {
 
-        InboundSecurityTokenImpl securityContextToken = new InboundSecurityTokenImpl(
+        AbstractInboundSecurityToken securityContextToken = new AbstractInboundSecurityToken(
                 tokenContext.getWsSecurityContext(),
                 securityContextTokenType.getId(), null) {
 
@@ -49,7 +49,7 @@ public class SecurityContextTokenValidat
             }
 
             @Override
-            public Key getKey(String algorithmURI, XMLSecurityConstants.KeyUsage keyUsage,
+            public Key getKey(String algorithmURI, XMLSecurityConstants.AlgorithmUsage algorithmUsage,
                               String correlationID) throws XMLSecurityException {
 
                 Key key = getSecretKey().get(algorithmURI);
@@ -72,9 +72,9 @@ public class SecurityContextTokenValidat
             }
 
             @Override
-            public WSSConstants.TokenType getTokenType() {
+            public WSSecurityTokenConstants.TokenType getTokenType() {
                 //todo and set externalUriRef
-                return WSSConstants.SecurityContextToken;
+                return WSSecurityTokenConstants.SecurityContextToken;
             }
         };
 

Modified: webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/validate/SignatureTokenValidator.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/validate/SignatureTokenValidator.java?rev=1463136&r1=1463135&r2=1463136&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/validate/SignatureTokenValidator.java (original)
+++ webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/validate/SignatureTokenValidator.java Mon Apr  1 13:57:32 2013
@@ -20,9 +20,11 @@ package org.apache.wss4j.stax.validate;
 
 import org.apache.wss4j.common.ext.WSSecurityException;
 import org.apache.wss4j.stax.ext.WSSSecurityProperties;
-import org.apache.xml.security.stax.ext.SecurityToken;
+import org.apache.xml.security.stax.securityToken.InboundSecurityToken;
 
 public interface SignatureTokenValidator extends Validator {
 
-    void validate(SecurityToken securityToken, WSSSecurityProperties wssSecurityProperties) throws WSSecurityException;
+    void validate(
+            InboundSecurityToken inboundSecurityToken, WSSSecurityProperties wssSecurityProperties)
+            throws WSSecurityException;
 }

Modified: webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/validate/SignatureTokenValidatorImpl.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/validate/SignatureTokenValidatorImpl.java?rev=1463136&r1=1463135&r2=1463136&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/validate/SignatureTokenValidatorImpl.java (original)
+++ webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/validate/SignatureTokenValidatorImpl.java Mon Apr  1 13:57:32 2013
@@ -21,14 +21,16 @@ package org.apache.wss4j.stax.validate;
 import org.apache.wss4j.common.ext.WSSecurityException;
 import org.apache.wss4j.stax.ext.WSSSecurityProperties;
 import org.apache.xml.security.exceptions.XMLSecurityException;
-import org.apache.xml.security.stax.ext.SecurityToken;
+import org.apache.xml.security.stax.securityToken.InboundSecurityToken;
 
 public class SignatureTokenValidatorImpl implements SignatureTokenValidator {
 
     @Override
-    public void validate(SecurityToken securityToken, WSSSecurityProperties wssSecurityProperties) throws WSSecurityException {
+    public void validate(
+            InboundSecurityToken inboundSecurityToken, WSSSecurityProperties wssSecurityProperties)
+            throws WSSecurityException {
         try {
-            securityToken.verify();
+            inboundSecurityToken.verify();
         } catch (XMLSecurityException e) {
             throw new WSSecurityException(WSSecurityException.ErrorCode.FAILED_AUTHENTICATION, e);
         }

Modified: webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/validate/TokenContext.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/validate/TokenContext.java?rev=1463136&r1=1463135&r2=1463136&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/validate/TokenContext.java (original)
+++ webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/validate/TokenContext.java Mon Apr  1 13:57:32 2013
@@ -18,8 +18,8 @@
  */
 package org.apache.wss4j.stax.validate;
 
+import org.apache.wss4j.stax.ext.WSInboundSecurityContext;
 import org.apache.wss4j.stax.ext.WSSSecurityProperties;
-import org.apache.wss4j.stax.ext.WSSecurityContext;
 import org.apache.xml.security.stax.ext.stax.XMLSecEvent;
 
 import javax.xml.namespace.QName;
@@ -28,15 +28,15 @@ import java.util.List;
 public class TokenContext {
 
     private WSSSecurityProperties wssSecurityProperties;
-    private WSSecurityContext wsSecurityContext;
+    private WSInboundSecurityContext wsInboundSecurityContext;
     private List<XMLSecEvent> xmlSecEvents;
     private List<QName> elementPath;
 
-    public TokenContext(WSSSecurityProperties wssSecurityProperties, WSSecurityContext wsSecurityContext,
+    public TokenContext(WSSSecurityProperties wssSecurityProperties, WSInboundSecurityContext wsInboundSecurityContext,
                         List<XMLSecEvent> xmlSecEvents, List<QName> elementPath) {
 
         this.wssSecurityProperties = wssSecurityProperties;
-        this.wsSecurityContext = wsSecurityContext;
+        this.wsInboundSecurityContext = wsInboundSecurityContext;
         this.xmlSecEvents = xmlSecEvents;
         this.elementPath = elementPath;
     }
@@ -45,8 +45,8 @@ public class TokenContext {
         return wssSecurityProperties;
     }
 
-    public WSSecurityContext getWsSecurityContext() {
-        return wsSecurityContext;
+    public WSInboundSecurityContext getWsSecurityContext() {
+        return wsInboundSecurityContext;
     }
 
     public List<QName> getElementPath() {

Modified: webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/validate/UsernameTokenValidator.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/validate/UsernameTokenValidator.java?rev=1463136&r1=1463135&r2=1463136&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/validate/UsernameTokenValidator.java (original)
+++ webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/validate/UsernameTokenValidator.java Mon Apr  1 13:57:32 2013
@@ -20,10 +20,11 @@ package org.apache.wss4j.stax.validate;
 
 import org.apache.wss4j.binding.wss10.UsernameTokenType;
 import org.apache.wss4j.common.ext.WSSecurityException;
-import org.apache.wss4j.stax.ext.InboundSecurityToken;
+import org.apache.wss4j.stax.securityToken.UsernameSecurityToken;
+import org.apache.xml.security.stax.securityToken.InboundSecurityToken;
 
 public interface UsernameTokenValidator extends Validator {
 
-    InboundSecurityToken validate(UsernameTokenType usernameTokenType, TokenContext tokenContext)
+    <T extends UsernameSecurityToken & InboundSecurityToken> T validate(UsernameTokenType usernameTokenType, TokenContext tokenContext)
             throws WSSecurityException;
 }

Modified: webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/validate/UsernameTokenValidatorImpl.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/validate/UsernameTokenValidatorImpl.java?rev=1463136&r1=1463135&r2=1463136&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/validate/UsernameTokenValidatorImpl.java (original)
+++ webservices/wss4j/trunk/ws-security-stax/src/main/java/org/apache/wss4j/stax/validate/UsernameTokenValidatorImpl.java Mon Apr  1 13:57:32 2013
@@ -18,8 +18,6 @@
  */
 package org.apache.wss4j.stax.validate;
 
-import java.io.UnsupportedEncodingException;
-
 import org.apache.commons.codec.binary.Base64;
 import org.apache.wss4j.binding.wss10.AttributedString;
 import org.apache.wss4j.binding.wss10.EncodedString;
@@ -28,17 +26,19 @@ import org.apache.wss4j.binding.wss10.Us
 import org.apache.wss4j.binding.wsu10.AttributedDateTime;
 import org.apache.wss4j.common.ext.WSPasswordCallback;
 import org.apache.wss4j.common.ext.WSSecurityException;
-import org.apache.wss4j.common.principal.WSUsernameTokenPrincipal;
-import org.apache.wss4j.stax.ext.InboundSecurityToken;
 import org.apache.wss4j.stax.ext.WSSConstants;
 import org.apache.wss4j.stax.ext.WSSUtils;
-import org.apache.wss4j.stax.impl.securityToken.UsernameSecurityToken;
+import org.apache.wss4j.stax.securityToken.UsernameSecurityToken;
+import org.apache.wss4j.stax.securityToken.WSSecurityTokenConstants;
+import org.apache.wss4j.stax.impl.securityToken.UsernameSecurityTokenImpl;
 import org.apache.xml.security.stax.ext.XMLSecurityUtils;
+import org.apache.xml.security.stax.securityToken.InboundSecurityToken;
 
 public class UsernameTokenValidatorImpl implements UsernameTokenValidator {
 
     @Override
-    public InboundSecurityToken validate(UsernameTokenType usernameTokenType, TokenContext tokenContext) throws WSSecurityException {
+    public <T extends UsernameSecurityToken & InboundSecurityToken> T validate(
+            UsernameTokenType usernameTokenType, TokenContext tokenContext) throws WSSecurityException {
 
         // If the UsernameToken is to be used for key derivation, the (1.1)
         // spec says that it cannot contain a password, and it must contain
@@ -72,11 +72,10 @@ public class UsernameTokenValidatorImpl 
 
         final AttributedDateTime attributedDateTimeCreated =
                 XMLSecurityUtils.getQNameType(usernameTokenType.getAny(), WSSConstants.TAG_wsu_Created);
-        final String created;
+
+        String created = null;
         if (attributedDateTimeCreated != null) {
             created = attributedDateTimeCreated.getValue();
-        } else {
-            created = null;
         }
 
         if (usernameTokenPasswordType == WSSConstants.UsernameTokenPasswordType.PASSWORD_DIGEST) {
@@ -118,32 +117,17 @@ public class UsernameTokenValidatorImpl 
             password = null;
         }
 
-        UsernameSecurityToken usernameSecurityToken = new UsernameSecurityToken(
-                username.getValue(), password, created, nonceVal, salt, iteration,
+        UsernameSecurityTokenImpl usernameSecurityToken = new UsernameSecurityTokenImpl(
+                usernameTokenPasswordType, username.getValue(), password, created,
+                encodedNonce != null ? encodedNonce.getValue() : null, salt, iteration,
                 tokenContext.getWsSecurityContext(), usernameTokenType.getId(),
-                WSSConstants.WSSKeyIdentifierType.SECURITY_TOKEN_DIRECT_REFERENCE);
+                WSSecurityTokenConstants.KeyIdentifier_SecurityTokenDirectReference);
         usernameSecurityToken.setElementPath(tokenContext.getElementPath());
         usernameSecurityToken.setXMLSecEvent(tokenContext.getFirstXMLSecEvent());
-        
-        boolean hashed = 
-            (usernameTokenPasswordType == WSSConstants.UsernameTokenPasswordType.PASSWORD_DIGEST);
-        WSUsernameTokenPrincipal principal = 
-            new WSUsernameTokenPrincipal(username.getValue(), hashed);
-        if (nonceVal != null) {
-            try {
-                principal.setNonce(new String(nonceVal, "UTF-8"));
-            } catch (UnsupportedEncodingException e) {
-                throw new WSSecurityException(WSSecurityException.ErrorCode.FAILED_AUTHENTICATION, e);
-            }
-        }
-        principal.setPassword(password);
-        principal.setCreatedTime(created);
-        if (passwordType != null && passwordType.getType() != null) {
-            principal.setPasswordType(passwordType.getType().toString());
-        }
-        usernameSecurityToken.setPrincipal(principal);
 
-        return usernameSecurityToken;
+        @SuppressWarnings("unchecked")
+        T token = (T)usernameSecurityToken;
+        return token;
     }
     
     /**

Modified: webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/AbstractTestBase.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/AbstractTestBase.java?rev=1463136&r1=1463135&r2=1463136&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/AbstractTestBase.java (original)
+++ webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/AbstractTestBase.java Mon Apr  1 13:57:32 2013
@@ -41,7 +41,7 @@ import org.apache.wss4j.stax.test.utils.
 import org.apache.wss4j.stax.test.utils.StAX2DOM;
 import org.apache.wss4j.stax.test.utils.XmlReaderToWriter;
 import org.apache.xml.security.exceptions.XMLSecurityException;
-import org.apache.xml.security.stax.impl.SecurityContextImpl;
+import org.apache.xml.security.stax.impl.InboundSecurityContextImpl;
 import org.apache.xml.security.stax.impl.processor.input.AbstractDecryptInputProcessor;
 import org.apache.xml.security.stax.impl.processor.input.AbstractSignatureReferenceVerifyInputProcessor;
 import org.apache.xml.security.stax.impl.processor.input.XMLEventReaderInputProcessor;
@@ -695,7 +695,7 @@ public abstract class AbstractTestBase {
     }
 
     public static void switchAllowMD5Algorithm(Boolean value) throws NoSuchFieldException, IllegalAccessException {
-        Field field = SecurityContextImpl.class.getDeclaredField("allowMD5Algorithm");
+        Field field = InboundSecurityContextImpl.class.getDeclaredField("allowMD5Algorithm");
         field.setAccessible(true);
 
         Field modifiersField = Field.class.getDeclaredField("modifiers");

Modified: webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/DerivedKeyTokenTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/DerivedKeyTokenTest.java?rev=1463136&r1=1463135&r2=1463136&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/DerivedKeyTokenTest.java (original)
+++ webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/DerivedKeyTokenTest.java Mon Apr  1 13:57:32 2013
@@ -32,6 +32,7 @@ import org.apache.wss4j.stax.ext.Inbound
 import org.apache.wss4j.stax.ext.OutboundWSSec;
 import org.apache.wss4j.stax.ext.WSSConstants;
 import org.apache.wss4j.stax.ext.WSSSecurityProperties;
+import org.apache.wss4j.stax.securityToken.WSSecurityTokenConstants;
 import org.apache.wss4j.stax.securityEvent.EncryptedPartSecurityEvent;
 import org.apache.wss4j.stax.securityEvent.OperationSecurityEvent;
 import org.apache.wss4j.stax.securityEvent.WSSecurityEventConstants;
@@ -89,7 +90,7 @@ public class DerivedKeyTokenTest extends
             securityProperties.loadEncryptionKeystore(this.getClass().getClassLoader().getResource("transmitter.jks"), "default".toCharArray());
             securityProperties.setEncryptionUser("receiver");
             securityProperties.setEncryptionSymAlgorithm("http://www.w3.org/2001/04/xmlenc#tripledes-cbc");
-            securityProperties.setEncryptionKeyIdentifierType(WSSConstants.WSSKeyIdentifierType.THUMBPRINT_IDENTIFIER);
+            securityProperties.setEncryptionKeyIdentifier(WSSecurityTokenConstants.KeyIdentifier_ThumbprintIdentifier);
 
             OutboundWSSec wsSecOut = WSSec.getOutboundWSSec(securityProperties);
             XMLStreamWriter xmlStreamWriter = wsSecOut.processOutMessage(baos, "UTF-8", new ArrayList<SecurityEvent>());
@@ -213,7 +214,7 @@ public class DerivedKeyTokenTest extends
             securityProperties.loadEncryptionKeystore(this.getClass().getClassLoader().getResource("transmitter.jks"), "default".toCharArray());
             securityProperties.setEncryptionUser("receiver");
             securityProperties.setEncryptionSymAlgorithm("http://www.w3.org/2001/04/xmlenc#aes128-cbc");
-            securityProperties.setEncryptionKeyIdentifierType(WSSConstants.WSSKeyIdentifierType.THUMBPRINT_IDENTIFIER);
+            securityProperties.setEncryptionKeyIdentifier(WSSecurityTokenConstants.KeyIdentifier_ThumbprintIdentifier);
 
             OutboundWSSec wsSecOut = WSSec.getOutboundWSSec(securityProperties);
             XMLStreamWriter xmlStreamWriter = wsSecOut.processOutMessage(baos, "UTF-8", new ArrayList<SecurityEvent>());
@@ -294,7 +295,7 @@ public class DerivedKeyTokenTest extends
             securityProperties.setOutAction(actions);
             CallbackHandlerImpl callbackHandler = new CallbackHandlerImpl();
             securityProperties.setCallbackHandler(callbackHandler);
-            securityProperties.setEncryptionKeyIdentifierType(WSSConstants.WSSKeyIdentifierType.THUMBPRINT_IDENTIFIER);
+            securityProperties.setEncryptionKeyIdentifier(WSSecurityTokenConstants.KeyIdentifier_ThumbprintIdentifier);
             securityProperties.setSignatureAlgorithm("http://www.w3.org/2000/09/xmldsig#hmac-sha1");
             securityProperties.loadEncryptionKeystore(this.getClass().getClassLoader().getResource("transmitter.jks"), "default".toCharArray());
             securityProperties.setEncryptionUser("receiver");
@@ -383,7 +384,7 @@ public class DerivedKeyTokenTest extends
             securityProperties.loadSignatureKeyStore(this.getClass().getClassLoader().getResource("receiver.jks"), "default".toCharArray());
             securityProperties.setSignatureUser("receiver");
             securityProperties.setDerivedKeyTokenReference(WSSConstants.DerivedKeyTokenReference.DirectReference);
-            securityProperties.setDerivedKeyKeyIdentifierType(WSSConstants.WSSKeyIdentifierType.THUMBPRINT_IDENTIFIER);
+            securityProperties.setDerivedKeyKeyIdentifier(WSSecurityTokenConstants.KeyIdentifier_ThumbprintIdentifier);
 
             OutboundWSSec wsSecOut = WSSec.getOutboundWSSec(securityProperties);
             XMLStreamWriter xmlStreamWriter = wsSecOut.processOutMessage(baos, "UTF-8", new ArrayList<SecurityEvent>());
@@ -474,7 +475,7 @@ public class DerivedKeyTokenTest extends
             securityProperties.loadSignatureKeyStore(this.getClass().getClassLoader().getResource("receiver.jks"), "default".toCharArray());
             securityProperties.setSignatureUser("receiver");
             securityProperties.setDerivedKeyTokenReference(WSSConstants.DerivedKeyTokenReference.DirectReference);
-            securityProperties.setDerivedKeyKeyIdentifierType(WSSConstants.WSSKeyIdentifierType.SKI_KEY_IDENTIFIER);
+            securityProperties.setDerivedKeyKeyIdentifier(WSSecurityTokenConstants.KeyIdentifier_SkiKeyIdentifier);
 
             OutboundWSSec wsSecOut = WSSec.getOutboundWSSec(securityProperties);
             XMLStreamWriter xmlStreamWriter = wsSecOut.processOutMessage(baos, "UTF-8", new ArrayList<SecurityEvent>());
@@ -566,8 +567,8 @@ public class DerivedKeyTokenTest extends
             securityProperties.setSignatureUser("receiver");
             securityProperties.loadEncryptionKeystore(this.getClass().getClassLoader().getResource("receiver.jks"), "default".toCharArray());
             securityProperties.setEncryptionUser("receiver");
-            securityProperties.setEncryptionKeyIdentifierType(WSSConstants.WSSKeyIdentifierType.THUMBPRINT_IDENTIFIER);
-            securityProperties.setSignatureKeyIdentifierType(WSSConstants.WSSKeyIdentifierType.THUMBPRINT_IDENTIFIER);
+            securityProperties.setEncryptionKeyIdentifier(WSSecurityTokenConstants.KeyIdentifier_ThumbprintIdentifier);
+            securityProperties.setSignatureKeyIdentifier(WSSecurityTokenConstants.KeyIdentifier_ThumbprintIdentifier);
             securityProperties.setDerivedKeyTokenReference(WSSConstants.DerivedKeyTokenReference.EncryptedKey);
 
             OutboundWSSec wsSecOut = WSSec.getOutboundWSSec(securityProperties);
@@ -738,7 +739,7 @@ public class DerivedKeyTokenTest extends
             securityProperties.setSignatureUser("receiver");
             securityProperties.loadEncryptionKeystore(this.getClass().getClassLoader().getResource("receiver.jks"), "default".toCharArray());
             securityProperties.setEncryptionUser("receiver");
-            securityProperties.setEncryptionKeyIdentifierType(WSSConstants.WSSKeyIdentifierType.THUMBPRINT_IDENTIFIER);
+            securityProperties.setEncryptionKeyIdentifier(WSSecurityTokenConstants.KeyIdentifier_ThumbprintIdentifier);
             securityProperties.setDerivedKeyTokenReference(WSSConstants.DerivedKeyTokenReference.EncryptedKey);
 
             OutboundWSSec wsSecOut = WSSec.getOutboundWSSec(securityProperties);

Modified: webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/EncDecryptionTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/EncDecryptionTest.java?rev=1463136&r1=1463135&r2=1463136&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/EncDecryptionTest.java (original)
+++ webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/EncDecryptionTest.java Mon Apr  1 13:57:32 2013
@@ -25,6 +25,7 @@ import org.apache.wss4j.dom.handler.WSHa
 import org.apache.wss4j.stax.WSSec;
 import org.apache.wss4j.stax.ext.WSSConstants;
 import org.apache.wss4j.stax.ext.WSSSecurityProperties;
+import org.apache.wss4j.stax.securityToken.WSSecurityTokenConstants;
 import org.apache.wss4j.stax.securityEvent.*;
 import org.apache.xml.security.stax.config.Init;
 import org.apache.xml.security.stax.config.TransformerAlgorithmMapper;
@@ -839,7 +840,7 @@ public class EncDecryptionTest extends A
             securityProperties.setOutAction(actions);
             securityProperties.loadEncryptionKeystore(this.getClass().getClassLoader().getResource("transmitter.jks"), "default".toCharArray());
             securityProperties.setEncryptionUser("receiver");
-            securityProperties.setEncryptionKeyIdentifierType(WSSConstants.WSSKeyIdentifierType.ISSUER_SERIAL);
+            securityProperties.setEncryptionKeyIdentifier(WSSecurityTokenConstants.KeyIdentifier_IssuerSerial);
 
             InputStream sourceDocument = this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-1.1.xml");
 
@@ -915,7 +916,7 @@ public class EncDecryptionTest extends A
             securityProperties.setOutAction(actions);
             securityProperties.loadEncryptionKeystore(this.getClass().getClassLoader().getResource("transmitter.jks"), "default".toCharArray());
             securityProperties.setEncryptionUser("receiver");
-            securityProperties.setEncryptionKeyIdentifierType(WSSConstants.WSSKeyIdentifierType.SECURITY_TOKEN_DIRECT_REFERENCE);
+            securityProperties.setEncryptionKeyIdentifier(WSSecurityTokenConstants.KeyIdentifier_SecurityTokenDirectReference);
 
             InputStream sourceDocument = this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-1.1.xml");
 
@@ -1085,7 +1086,7 @@ public class EncDecryptionTest extends A
             securityProperties.setOutAction(actions);
             securityProperties.loadEncryptionKeystore(this.getClass().getClassLoader().getResource("transmitter.jks"), "default".toCharArray());
             securityProperties.setEncryptionUser("receiver");
-            securityProperties.setEncryptionKeyIdentifierType(WSSConstants.WSSKeyIdentifierType.X509_KEY_IDENTIFIER);
+            securityProperties.setEncryptionKeyIdentifier(WSSecurityTokenConstants.KeyIdentifier_X509KeyIdentifier);
             InputStream sourceDocument = this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-1.1.xml");
 
             baos = doOutboundSecurity(securityProperties, sourceDocument);
@@ -1161,7 +1162,7 @@ public class EncDecryptionTest extends A
             securityProperties.setOutAction(actions);
             securityProperties.loadEncryptionKeystore(this.getClass().getClassLoader().getResource("transmitter.jks"), "default".toCharArray());
             securityProperties.setEncryptionUser("receiver");
-            securityProperties.setEncryptionKeyIdentifierType(WSSConstants.WSSKeyIdentifierType.SKI_KEY_IDENTIFIER);
+            securityProperties.setEncryptionKeyIdentifier(WSSecurityTokenConstants.KeyIdentifier_SkiKeyIdentifier);
 
             InputStream sourceDocument = this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-1.1.xml");
 
@@ -1237,7 +1238,7 @@ public class EncDecryptionTest extends A
             securityProperties.setOutAction(actions);
             securityProperties.loadEncryptionKeystore(this.getClass().getClassLoader().getResource("transmitter.jks"), "default".toCharArray());
             securityProperties.setEncryptionUser("receiver");
-            securityProperties.setEncryptionKeyIdentifierType(WSSConstants.WSSKeyIdentifierType.THUMBPRINT_IDENTIFIER);
+            securityProperties.setEncryptionKeyIdentifier(WSSecurityTokenConstants.KeyIdentifier_ThumbprintIdentifier);
 
             InputStream sourceDocument = this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-1.1.xml");
 
@@ -1313,7 +1314,7 @@ public class EncDecryptionTest extends A
             securityProperties.setOutAction(actions);
             securityProperties.loadEncryptionKeystore(this.getClass().getClassLoader().getResource("transmitter.jks"), "default".toCharArray());
             securityProperties.setEncryptionUser("receiver");
-            securityProperties.setEncryptionKeyIdentifierType(WSSConstants.WSSKeyIdentifierType.ISSUER_SERIAL);
+            securityProperties.setEncryptionKeyIdentifier(WSSecurityTokenConstants.KeyIdentifier_IssuerSerial);
 
             InputStream sourceDocument = this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-1.1.xml");
 

Modified: webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/EncryptionCRLTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/EncryptionCRLTest.java?rev=1463136&r1=1463135&r2=1463136&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/EncryptionCRLTest.java (original)
+++ webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/EncryptionCRLTest.java Mon Apr  1 13:57:32 2013
@@ -26,8 +26,8 @@ import javax.xml.xpath.XPathConstants;
 import javax.xml.xpath.XPathExpression;
 
 import org.apache.wss4j.stax.ext.WSSConstants;
-import org.apache.wss4j.stax.ext.WSSConstants.WSSKeyIdentifierType;
 import org.apache.wss4j.stax.ext.WSSSecurityProperties;
+import org.apache.wss4j.stax.securityToken.WSSecurityTokenConstants;
 import org.testng.Assert;
 import org.testng.annotations.Test;
 import org.w3c.dom.Document;
@@ -51,7 +51,7 @@ public class EncryptionCRLTest extends A
             securityProperties.setOutAction(actions);
             securityProperties.loadEncryptionKeystore(this.getClass().getClassLoader().getResource("wss40rev.jks"), "security".toCharArray());
             securityProperties.setEncryptionUser("wss40rev");
-            securityProperties.setEncryptionKeyIdentifierType(WSSKeyIdentifierType.SECURITY_TOKEN_DIRECT_REFERENCE);
+            securityProperties.setEncryptionKeyIdentifier(WSSecurityTokenConstants.KeyIdentifier_SecurityTokenDirectReference);
 
             InputStream sourceDocument = this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-1.1.xml");
             baos = doOutboundSecurity(securityProperties, sourceDocument);
@@ -98,7 +98,7 @@ public class EncryptionCRLTest extends A
             securityProperties.setOutAction(actions);
             securityProperties.loadEncryptionKeystore(this.getClass().getClassLoader().getResource("wss40rev.jks"), "security".toCharArray());
             securityProperties.setEncryptionUser("wss40rev");
-            securityProperties.setEncryptionKeyIdentifierType(WSSKeyIdentifierType.SECURITY_TOKEN_DIRECT_REFERENCE);
+            securityProperties.setEncryptionKeyIdentifier(WSSecurityTokenConstants.KeyIdentifier_SecurityTokenDirectReference);
             securityProperties.loadCRLCertStore(this.getClass().getClassLoader().getResource("wss40CACRL.pem"));
 
             InputStream sourceDocument = this.getClass().getClassLoader().getResourceAsStream("testdata/plain-soap-1.1.xml");



Mime
View raw message