Applied changes to issues found during code review of the Svc component.

This commit is contained in:
Juan Carlos Luciani
2007-01-08 10:36:42 +00:00
parent 0019475d4d
commit 2f30ab05db
30 changed files with 1174 additions and 782 deletions

View File

@@ -34,17 +34,26 @@
# #
#############################################################
SILENT=0
if [ "$1" != "" ]; then
if [ "$1" == "-s" ]; then
SILENT=1
fi
fi
if [ -d /usr/lib64 ]; then
LIB=lib64
LIB=lib64
else
LIB=lib
LIB=lib
fi
JAVA_HOME=/usr/$LIB/jvm/jre-1.5.0
# Do not do anything if the client keystore has already been created
if [ -f /etc/CASA/authtoken/keys/client/jks-store ]; then
echo "The client keystore is already setup"
if [ $SILENT == 0 ]; then
echo "The client keystore is already setup"
fi
else
if [ -f /etc/CASA/authtoken/keys/casaatsdSigningCert ]; then
echo "Setting up the clients's keystore"

View File

@@ -47,7 +47,7 @@ import com.novell.casa.authtoksvc.CasaIdentityToken;
* infrastructure.
*
*/
public class CasaLoginModule implements LoginModule
public final class CasaLoginModule implements LoginModule
{
private final static String casaUsername = "CasaIdentityUser";

View File

@@ -35,12 +35,12 @@ import com.novell.casa.authtoksvc.IdentityToken;
* identities authenticated by Casa.
*
*/
public class CasaPrincipal implements Principal
public final class CasaPrincipal implements Principal
{
private String m_name;
private String m_realm;
private String m_identStoreUrl;
private javax.naming.directory.Attributes m_attributes;
private final String m_name;
private final String m_realm;
private final String m_identStoreUrl;
private final javax.naming.directory.Attributes m_attributes;
/*
* Constructor
@@ -58,7 +58,7 @@ public class CasaPrincipal implements Principal
* (non-Javadoc)
* @see java.security.Principal#getName()
*/
public String getName()
public final String getName()
{
return m_name;
}
@@ -66,7 +66,7 @@ public class CasaPrincipal implements Principal
/*
* Returns the name associated with the source of the identity data.
*/
public String getRealm()
public final String getRealm()
{
return m_realm;
}
@@ -74,7 +74,7 @@ public class CasaPrincipal implements Principal
/*
* Returns the url associated with the source of the identity data.
*/
public String getIdentStoreUrl()
public final String getIdentStoreUrl()
{
return m_identStoreUrl;
}
@@ -82,7 +82,7 @@ public class CasaPrincipal implements Principal
/*
* Returns the identity attributes.
*/
public javax.naming.directory.Attributes getAttributes()
public final javax.naming.directory.Attributes getAttributes()
{
return m_attributes;
}

View File

@@ -44,7 +44,7 @@ import com.novell.casa.jaas.CasaPrincipal;
* This is a sample application which demonstrates the use of
* JAAS and Casa to authenticate a connection.
*/
public class SampleApp
public final class SampleApp
{
/**
* @param args

View File

@@ -33,9 +33,9 @@ import javax.security.auth.callback.PasswordCallback;
import javax.security.auth.callback.UnsupportedCallbackException;
public class SampleAppCallbackHandler implements CallbackHandler
public final class SampleAppCallbackHandler implements CallbackHandler
{
private String m_authToken;
private final String m_authToken;
/*
* Constructor
@@ -46,7 +46,7 @@ public class SampleAppCallbackHandler implements CallbackHandler
m_authToken = authToken;
}
public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException
public final void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException
{
for (int i = 0; i < callbacks.length; i++)
{