+ $ref = trim($ref);
+ $code = trim($code);
+
+ /* Validate ref string. */
+ if (!ctype_xdigit($ref) || strlen($ref) != JIRAFEAU_ASYNC_REF_LENGTH) {
+ return "Error: Malformed ref string";
+ }
+
+ /* Validate code string. */
+ if (!ctype_xdigit($code) || strlen($code) != JIRAFEAU_ASYNC_CODE_LENGTH) {
+ return "Error: Malformed code string";
+ }
+