Continue AuthToken development changes.

This commit is contained in:
Juan Carlos Luciani
2006-09-08 21:53:13 +00:00
parent 20608a9f65
commit b25b691642
9 changed files with 61 additions and 30 deletions

View File

@@ -27,7 +27,8 @@ EXTRA_DIST = authtoken.settings \
README \
svc.settings \
TODO \
web.xml
web.xml \
crypto.properties
ROOT = ../..
@@ -100,6 +101,7 @@ $(BUILDDIR)/$(WEBAPP): $(BUILDDIR) $(CLASSES)
cp svc.settings $(BUILDDIR)/webapp/WEB-INF/conf/svc.settings
cp authtoken.settings $(BUILDDIR)/webapp/WEB-INF/conf/authtoken.settings
cp identoken.settings $(BUILDDIR)/webapp/WEB-INF/conf/identoken.settings
cp crypto.properties $(BUILDDIR)/webapp/WEB-INF/classes/crypto.properties
cp src/com/novell/casa/authtoksvc/Krb5_mechanism.settings $(BUILDDIR)/webapp/WEB-INF/conf/installed_auth_mechanisms/Krb5Authenticate/mechanism.settings
cp src/com/novell/casa/authtoksvc/Pwd_mechanism.settings $(BUILDDIR)/webapp/WEB-INF/conf/installed_auth_mechanisms/PwdAuthenticate/mechanism.settings
cp $(IDENT_ABSTRACTION_DIR)/*.jar $(BUILDDIR)/webapp/WEB-INF/lib/

View File

@@ -287,24 +287,23 @@ public class AuthToken
*/
public static String validate(String authTokenString)
{
String idenTokenString = NULL;
// Instantiate the AuthToken, this validates the token itself.
try
{
AuthToken authToken = new AuthToken(authTokenString);
// If we are here is because the token validation succeeded,
// obtain the identity token string.
idenTokenString = authToken.getIdentityToken();
// return the identity token string.
return authToken.getIdentityToken();
}
catch (Exception e)
{
// The validation of one of the tokens failed
// tbd - Log
System.err.println("AuthToken.validate()- Exception caught during token processing, msg: " + e.getMessage());
}
return idenTokenString;
return null;
}
}
}