-
- if (token != null) {
- String hashes[] = token.split("~");
- if (hashes.length >= 2) {
- String wookie = hashes[0];
- String rehashed = hashes[1];
- String opts = hashes.length > 2 ? hashes[2] : "";
-
- if (CookieUtils.validateCookie(who + key, wookie)) {
- if (subkeys == null) {
- subkeys = new ArrayList<String>();
- }
- subkeys = new ArrayList<String>(subkeys);
- subkeys.add("");
-
- for (String subkey : subkeys) {
- if (CookieUtils.validateCookie(
- wookie + subkey + opts, rehashed)) {
- this.wookie = wookie;
- this.token = token;
- this.success = true;
-
- this.rw = opts.contains("|rw|");
- this.wl = !opts.contains("|wl|");
- this.bl = !opts.contains("|bl|");
- }
- }
- }
- }
-
- this.badToken = !success;
- }
-
- // No token -> no bad token
- }
-
- public boolean isSuccess() {
- return success;
+ super(cookie, who, key, subkeys,
+ subkeys == null || subkeys.isEmpty());