+
+ /**
+ * Populates TAG value for the user from DB
+ *
+ * @param trans
+ * @param req
+ * @param question
+ */
+ private static void populateCredentialTag(AuthzTrans trans, HttpServletRequest req, Question question) {
+
+ try {
+ String authz = req.getHeader("Authorization");
+ String decoded = Symm.base64noSplit.decode(authz.substring(6));
+ int colon = decoded.indexOf(':');
+ // Update transaction object with TAG information from DB
+ question.doesUserCredMatch(trans, decoded.substring(0, colon), decoded.substring(colon + 1).getBytes());
+ String tag = trans.getTag();
+ if (null != tag) {
+ req.setAttribute("CRED_TAG", tag);
+ }
+ } catch (Exception e) {
+ LogTarget lt = trans.error();
+ lt.log("Exception occured while fetching TAG details from DB :" + e.getMessage());
+ }
+ }