Continue AuthToken development changes.
This commit is contained in:
@@ -93,6 +93,9 @@ make
|
||||
install -d %{buildroot}%{prefix}
|
||||
install -d %{buildroot}%{prefix}/share
|
||||
install -d %{buildroot}%{prefix}/share/java
|
||||
install -d %{buildroot}/etc
|
||||
install -d -m 777 %{buildroot}/etc/CASA
|
||||
install -d -m 777 %{buildroot}/etc/CASA/authtoken
|
||||
|
||||
## CASA_auth_token_svc ##
|
||||
# Libs
|
||||
@@ -106,6 +109,7 @@ ln -sf CasaAuthTokenSvc-%{bldno}.war %{buildroot}%{prefix}/share/java/CasaAuthTo
|
||||
# Libs
|
||||
install -m 755 %{_lib}/java/CasaJaasSupport.jar %{buildroot}%{prefix}/share/java/CasaJaasSupport-%{bldno}.jar
|
||||
install -m 755 %{_lib}/java/CasaAuthToken.jar %{buildroot}%{prefix}/share/java/CasaAuthToken-%{bldno}.jar
|
||||
install -m 755 server/Svc/crypto.properties %{buildroot}/etc/CASA/authtoken/crypto.properties
|
||||
|
||||
# Lib Symbolic Links
|
||||
ln -sf CasaJaasSupport-%{bldno}.jar %{buildroot}%{prefix}/share/java/CasaJaasSupport.jar
|
||||
@@ -132,6 +136,8 @@ rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%dir /etc/CASA
|
||||
%dir /etc/CASA/authtoken
|
||||
%{prefix}/share/java/CasaAuthTokenSvc-%{bldno}.war
|
||||
%{prefix}/share/java/CasaAuthTokenSvc.war
|
||||
%{prefix}/share/java/CasaAuthTokenSvc.war.1
|
||||
@@ -152,12 +158,15 @@ rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%files -n CASA_auth_token_jaas_support
|
||||
%defattr(-,root,root)
|
||||
%dir /etc/CASA
|
||||
%dir /etc/CASA/authtoken
|
||||
%{prefix}/share/java/CasaJaasSupport-%{bldno}.jar
|
||||
%{prefix}/share/java/CasaJaasSupport.jar
|
||||
%{prefix}/share/java/CasaJaasSupport.jar.1
|
||||
%{prefix}/share/java/CasaAuthToken-%{bldno}.jar
|
||||
%{prefix}/share/java/CasaAuthToken.jar
|
||||
%{prefix}/share/java/CasaAuthToken.jar.1
|
||||
/etc/CASA/authtoken/crypto.properties
|
||||
|
||||
|
||||
%changelog -n CASA_auth_token_svc
|
||||
|
||||
@@ -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/
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user