[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wss4j-dev
Subject:    [jira] Created: (WSS-118) Support for SAML 1.1
From:       "Rasmus Rhein Helwigh (JIRA)" <jira () apache ! org>
Date:       2008-05-20 11:30:57
Message-ID: 75821824.1211283057239.JavaMail.jira () brutus
[Download RAW message or body]

Support for SAML 1.1 SecurityTokenReferences in  \
                /org/apache/ws/security/processor/DerivedKeyTokenProcessor
-----------------------------------------------------------------------------------------------------------


                 Key: WSS-118
                 URL: https://issues.apache.org/jira/browse/WSS-118
             Project: WSS4J
          Issue Type: Improvement
         Environment: Trunk
            Reporter: Rasmus Rhein Helwigh
            Assignee: Ruchith Udayanga Fernando


This patch enables handling of SecurityTokenReference is of type SAML_ID_URI in \
DerivedKeyTokenProcessor.



Index: C:/src/Main/java/wss4j-svn/src/org/apache/ws/security/processor/DerivedKeyTokenProcessor.java
 ===================================================================
--- C:/src/Main/java/wss4j-svn/src/org/apache/ws/security/processor/DerivedKeyTokenProcessor.java	(revision \
                654702)
+++ C:/src/Main/java/wss4j-svn/src/org/apache/ws/security/processor/DerivedKeyTokenProcessor.java	(working \
copy) @@ -200,20 +200,29 @@
     	if (keyIdentifierType.equals
     			(SecurityTokenReference.ENC_KEY_SHA1_URI)) {
 
-            pwcb = new WSPasswordCallback(keyIdentifierValue,
+            	pwcb = new WSPasswordCallback(keyIdentifierValue,
                                                \
                WSPasswordCallback.ENCRYPTED_KEY_TOKEN);
-            try {
-            	cb.handle(new Callback[]{pwcb});
-            } catch (IOException e) {
-                throw new WSSecurityException(WSSecurityException.FAILURE, "noKey",
-                        new Object[] { id });
-            } catch (UnsupportedCallbackException e) {
-                throw new WSSecurityException(WSSecurityException.FAILURE, "noKey",
-                        new Object[] { id });
-            }
-            
-        }
-    	return pwcb.getKey();
+		}
+		else if ( keyIdentifierType.equals(SecurityTokenReference.SAML_ID_URI))
+		{
+			pwcb = new WSPasswordCallback(keyIdentifierValue,
+                                           WSPasswordCallback.CUSTOM_TOKEN);
+		}
+		else
+		{
+			throw new WSSecurityException(WSSecurityException.FAILURE, "Keyidentifier \
unsupported", +                new Object[] { keyIdentifierType });
+		}
+        try {
+        	cb.handle(new Callback[]{pwcb});
+        } catch (IOException e) {
+            throw new WSSecurityException(WSSecurityException.FAILURE, "noKey",
+                    new Object[] { id });
+        } catch (UnsupportedCallbackException e) {
+            throw new WSSecurityException(WSSecurityException.FAILURE, "noKey",
+                    new Object[] { id });
+        }            
+        return pwcb.getKey();        	    	
     }
     
     /**


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic