You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by sv...@apache.org on 2008/03/12 20:14:41 UTC
svn commit: r636460 - in
/incubator/tuscany/java/sca/demos/bigbank-stockquote: pom.xml
src/main/java/stockquote/PasswordCallbackHandler.java
src/main/resources/stockQuote.jks
Author: svkrish
Date: Wed Mar 12 12:14:32 2008
New Revision: 636460
URL: http://svn.apache.org/viewvc?rev=636460&view=rev
Log:
adding keystore and password callback handler
Added:
incubator/tuscany/java/sca/demos/bigbank-stockquote/src/main/java/stockquote/PasswordCallbackHandler.java (with props)
Modified:
incubator/tuscany/java/sca/demos/bigbank-stockquote/pom.xml
incubator/tuscany/java/sca/demos/bigbank-stockquote/src/main/resources/stockQuote.jks
Modified: incubator/tuscany/java/sca/demos/bigbank-stockquote/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/bigbank-stockquote/pom.xml?rev=636460&r1=636459&r2=636460&view=diff
==============================================================================
--- incubator/tuscany/java/sca/demos/bigbank-stockquote/pom.xml (original)
+++ incubator/tuscany/java/sca/demos/bigbank-stockquote/pom.xml Wed Mar 12 12:14:32 2008
@@ -41,6 +41,12 @@
<artifactId>tuscany-host-embedded</artifactId>
<version>1.2-incubating-SNAPSHOT</version>
</dependency>
+
+ <dependency>
+ <groupId>org.apache.ws.security</groupId>
+ <artifactId>wss4j</artifactId>
+ <version>1.5.3</version>
+ </dependency>
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
Added: incubator/tuscany/java/sca/demos/bigbank-stockquote/src/main/java/stockquote/PasswordCallbackHandler.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/bigbank-stockquote/src/main/java/stockquote/PasswordCallbackHandler.java?rev=636460&view=auto
==============================================================================
--- incubator/tuscany/java/sca/demos/bigbank-stockquote/src/main/java/stockquote/PasswordCallbackHandler.java (added)
+++ incubator/tuscany/java/sca/demos/bigbank-stockquote/src/main/java/stockquote/PasswordCallbackHandler.java Wed Mar 12 12:14:32 2008
@@ -0,0 +1,47 @@
+/*
+ * 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 stockquote;
+
+import java.io.IOException;
+
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.UnsupportedCallbackException;
+
+import org.apache.ws.security.WSPasswordCallback;
+
+/**
+ * Sample userid passwd generation class
+ */
+public class PasswordCallbackHandler implements CallbackHandler {
+
+ public void handle(Callback[] callbacks) throws IOException,
+ UnsupportedCallbackException {
+ for (int i = 0; i < callbacks.length; i++) {
+ System.out.println("*** Calling Server User/Passwd Handler...." );
+ WSPasswordCallback pwcb = (WSPasswordCallback)callbacks[i];
+ System.out.println("*** Getting password for user ...." + pwcb.getIdentifer() + " & " + pwcb.getKey());
+ if ( pwcb.getUsage() == WSPasswordCallback.SIGNATURE ) {
+ System.out.println(" Usage is SIGNATURE ... ");
+ pwcb.setPassword("sqservice");
+ }
+ }
+ }
+
+}
Propchange: incubator/tuscany/java/sca/demos/bigbank-stockquote/src/main/java/stockquote/PasswordCallbackHandler.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/demos/bigbank-stockquote/src/main/java/stockquote/PasswordCallbackHandler.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified: incubator/tuscany/java/sca/demos/bigbank-stockquote/src/main/resources/stockQuote.jks
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/demos/bigbank-stockquote/src/main/resources/stockQuote.jks?rev=636460&r1=636459&r2=636460&view=diff
==============================================================================
Binary files - no diff available.
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org