diff options
author | Fraser Tweedale <ftweedal@redhat.com> | 2016-12-07 12:25:01 +1000 |
---|---|---|
committer | Fraser Tweedale <ftweedal@redhat.com> | 2016-12-12 11:49:54 +1000 |
commit | d699d27c7d7a59cf613380ec2214333ecc96ec23 (patch) | |
tree | 4adfa877961aa8716bb091c3262e980f32d6d0a9 /base/server | |
parent | e2e4b70bab9c81b9007057cafd25447190d6cde4 (diff) | |
download | pki-d699d27c7d7a59cf613380ec2214333ecc96ec23.tar.gz pki-d699d27c7d7a59cf613380ec2214333ecc96ec23.tar.xz pki-d699d27c7d7a59cf613380ec2214333ecc96ec23.zip |
Define "auth_token" IRequest extdata key prefix in one place
Part of: https://fedorahosted.org/pki/ticket/1359
Diffstat (limited to 'base/server')
3 files changed, 14 insertions, 8 deletions
diff --git a/base/server/cms/src/com/netscape/cms/servlet/cert/CertProcessor.java b/base/server/cms/src/com/netscape/cms/servlet/cert/CertProcessor.java index 17b453ab5..cb5efa0b0 100644 --- a/base/server/cms/src/com/netscape/cms/servlet/cert/CertProcessor.java +++ b/base/server/cms/src/com/netscape/cms/servlet/cert/CertProcessor.java @@ -310,12 +310,17 @@ public class CertProcessor extends CAProcessor { String[] tokenVals = authToken.getInStringArray(tokenName); if (tokenVals != null) { for (int i = 0; i < tokenVals.length; i++) { - req.setExtData(ARG_AUTH_TOKEN + "." + tokenName + "[" + i + "]", tokenVals[i]); + req.setExtData( + IRequest.AUTH_TOKEN_PREFIX + + "." + tokenName + "[" + i + "]" + , tokenVals[i]); } } else { String tokenVal = authToken.getInString(tokenName); if (tokenVal != null) { - req.setExtData(ARG_AUTH_TOKEN + "." + tokenName, tokenVal); + req.setExtData( + IRequest.AUTH_TOKEN_PREFIX + "." + tokenName, + tokenVal); // if RA agent, auto assign the request if (tokenName.equals("uid")) uid = tokenVal; diff --git a/base/server/cms/src/com/netscape/cms/servlet/processors/CAProcessor.java b/base/server/cms/src/com/netscape/cms/servlet/processors/CAProcessor.java index bb3cfa84a..ae91f6495 100644 --- a/base/server/cms/src/com/netscape/cms/servlet/processors/CAProcessor.java +++ b/base/server/cms/src/com/netscape/cms/servlet/processors/CAProcessor.java @@ -72,7 +72,6 @@ import netscape.security.x509.X509CertImpl; public class CAProcessor extends Processor { - public final static String ARG_AUTH_TOKEN = "auth_token"; public final static String ARG_REQUEST_OWNER = "requestOwner"; public final static String HDR_LANG = "accept-language"; public final static String ARG_PROFILE = "profile"; diff --git a/base/server/cms/src/com/netscape/cms/servlet/profile/ProfileSubmitCMCServlet.java b/base/server/cms/src/com/netscape/cms/servlet/profile/ProfileSubmitCMCServlet.java index f3adc5e85..619103190 100644 --- a/base/server/cms/src/com/netscape/cms/servlet/profile/ProfileSubmitCMCServlet.java +++ b/base/server/cms/src/com/netscape/cms/servlet/profile/ProfileSubmitCMCServlet.java @@ -76,7 +76,6 @@ public class ProfileSubmitCMCServlet extends ProfileServlet { * */ private static final long serialVersionUID = -8017841111435988197L; - private static final String ARG_AUTH_TOKEN = "auth_token"; private static final String PROP_PROFILE_ID = "profileId"; private String mProfileId = null; @@ -545,14 +544,17 @@ public class ProfileSubmitCMCServlet extends ProfileServlet { String[] vals = authToken.getInStringArray(tokenName); if (vals != null) { for (int i = 0; i < vals.length; i++) { - reqs[k].setExtData(ARG_AUTH_TOKEN + "." + - tokenName + "[" + i + "]", vals[i]); + reqs[k].setExtData( + IRequest.AUTH_TOKEN_PREFIX + + "." + tokenName + "[" + i + "]", + vals[i]); } } else { String val = authToken.getInString(tokenName); if (val != null) { - reqs[k].setExtData(ARG_AUTH_TOKEN + "." + tokenName, - val); + reqs[k].setExtData( + IRequest.AUTH_TOKEN_PREFIX + "." + tokenName, + val); } } } |