d8-contrib-modules / cloudflarephpsdk

PHP SDK For interfacing with CloudFlare's API
8 stars 19 forks source link

Api key too long - invalid #34

Open ivangrozni opened 3 years ago

ivangrozni commented 3 years ago

Small improvement off this PR https://github.com/d8-contrib-modules/cloudflarephpsdk/pull/33 Which addresses this issue https://www.drupal.org/project/cloudflare/issues/3149855

froboy commented 3 years ago

I think doing our own checks on the validity of this token are going to result in problems. As per https://api.cloudflare.com/#user-api-tokens-verify-token it looks like tokens could have - or _ as well. Instead of doing our own validation, could we make a call to GET user/tokens/verify to have Cloudflare verify the token?