From ce7f197ca57333a39ff629f0bd093801866618e5 Mon Sep 17 00:00:00 2001 From: wrightj-oss Date: Thu, 18 Dec 2003 17:40:56 +0000 Subject: [PATCH] Changed AS400 object setIdentityToken to take byte array. --- src/com/ibm/as400/access/AS400.java | 47 ++--------------------------- 1 file changed, 3 insertions(+), 44 deletions(-) diff --git a/src/com/ibm/as400/access/AS400.java b/src/com/ibm/as400/access/AS400.java index fd243ed16..d4067c916 100644 --- a/src/com/ibm/as400/access/AS400.java +++ b/src/com/ibm/as400/access/AS400.java @@ -32,7 +32,6 @@ import java.util.StringTokenizer; import java.util.Vector; -import com.ibm.eim.token.IdentityToken; import com.ibm.as400.security.auth.ProfileTokenCredential; /** @@ -288,40 +287,6 @@ public AS400(String systemName, String userId) proxyServer_ = resolveProxyServer(proxyServer_); } - /** - Constructs an AS400 object. It uses the specified system name and identity token. -

Note: Authentication via IdentityToken is not currently supported. Support will become available in a future PTF for OS/400 V5R2 and V5R1. - @param systemName The name of the server. Use localhost to access data locally. - @param identityToken The identity token to use to authenticate to the server. Must be an instance of com.ibm.eim.token.IdentityToken - **/ - public AS400(String systemName, Object identityToken) - { - super(); - if (Trace.traceOn_) Trace.log(Trace.DIAGNOSTIC, "Constructing AS400 object with identity token, system name: '" + systemName + "'"); - if (PASSWORD_TRACE) Trace.log(Trace.DIAGNOSTIC, "identity token: " + identityToken); - if (systemName == null) - { - Trace.log(Trace.ERROR, "Parameter 'systemName' is null."); - throw new NullPointerException("systemName"); - } - if (identityToken == null) - { - Trace.log(Trace.ERROR, "Parameter 'identityToken' is null."); - throw new NullPointerException("identityToken"); - } - construct(); - systemName_ = resolveSystem(systemName); - try { - bytes_ = store(((IdentityToken)identityToken).toBytes()); - } - catch (ClassCastException e) { - Trace.log(Trace.ERROR, "Argument must be of type IdentityToken.", e); - throw new ExtendedIllegalArgumentException("identityToken", ExtendedIllegalArgumentException.PARAMETER_VALUE_NOT_VALID); - } - byteType_ = AUTHENTICATION_SCHEME_IDENTITY_TOKEN; - proxyServer_ = resolveProxyServer(proxyServer_); - } - /** Constructs an AS400 object. It uses the specified system name and profile token. @param systemName The name of the server. Use localhost to access data locally. @@ -2641,9 +2606,9 @@ private void sendSignonRequest() throws AS400SecurityException, IOException /** Sets or resets the identity token for this object. Using this method will clear any set password.

Note: Authentication via IdentityToken is not currently supported. Support will become available in a future PTF for OS/400 V5R2 and V5R1. - @param identityToken The identity token. Must be an instance of com.ibm.eim.token.IdentityToken + @param identityToken The identity token. **/ - public void setIdentityToken(Object identityToken) + public void setIdentityToken(byte[] identityToken) { if (Trace.traceOn_) Trace.log(Trace.DIAGNOSTIC, "Setting identity token."); @@ -2655,13 +2620,7 @@ public void setIdentityToken(Object identityToken) synchronized (this) { - try { - bytes_ = store(((IdentityToken)identityToken).toBytes()); - } - catch (ClassCastException e) { - Trace.log(Trace.ERROR, "Argument must be of type IdentityToken.", e); - throw new ExtendedIllegalArgumentException("identityToken", ExtendedIllegalArgumentException.PARAMETER_VALUE_NOT_VALID); - } + bytes_ = store(identityToken); byteType_ = AUTHENTICATION_SCHEME_IDENTITY_TOKEN; signonInfo_ = null; }