Giter Site home page Giter Site logo

HTTP Error 401: Not Authorized about tourcms HOT 2 OPEN

DEV-XiA avatar DEV-XiA commented on August 19, 2024
HTTP Error 401: Not Authorized

from tourcms.

Comments (2)

InbalEl avatar InbalEl commented on August 19, 2024

Getting the same.
Seems to work just fine in node for me as well.
I think it has to be some change that was made to the functions being called in _generate_signature, but no idea what exactly. Have you managed to solve this?

--> Edit 1:

Just found the solution in one of the forks, change time parameter sent to _generate_signature to time.time().
Do I understand it? nope. But it works

Screenshot from 2022-11-27 17-23-08

--> Edit 2:
Now that I understand it, I added import calendar and changed it to:
signature = self._generate_signature(
path_with_params , verb, channel,int(calendar.timegm(req_time.timetuple()))
)

Seems more correct to be using the same variable as the one I'm using in x-tourcms-date header since the two should always match.

from tourcms.

paulslugocki avatar paulslugocki commented on August 19, 2024

Hi, TourCMS dev here.

Essentially Date (or x-tourcms-date) must match the date used to sign the request. From my limited Python knowledge this should be good. That said, do check #3 for an alternative, x-tourcms-date can be expressed as a unix timestamp.

from tourcms.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.