Giter Site home page Giter Site logo

kylmakalle / devicecheck Goto Github PK

View Code? Open in Web Editor NEW
20.0 3.0 4.0 39 KB

Reduce fraudulent use of your services by managing device state and asserting app integrity via Apple DeviceCheck API with this Python wrapper.

Home Page: https://developer.apple.com/documentation/devicecheck/accessing_and_modifying_per-device_data

License: MIT License

Python 100.00%
devicecheck apple api python security appsec ios macos swift

devicecheck's People

Contributors

dependabot[bot] avatar kylmakalle avatar thuvh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

devicecheck's Issues

Force refresh option for the JWT token isn't accessible from the other functions calling it.

Starting off, i wanted to admire the project, It helped many of my customers and users having better service.
Great work ๐Ÿ‘๐Ÿ‘.

Force refresh option for the JWT token isn't accessible from the other functions calling it from the _request or validate_device_token methods etc.

it should inherit the *args and **kwargs from it when it is called in line 335 in the init.py file

the old code:

  def _request(self, url, endpoint, payload, retrying_env=False, *args, **kwargs):
      log.debug(f'Sending request to {url}/{endpoint} with data {payload}')

      result = self._session.post(f"{url}/{endpoint}", json=payload, auth=BearerAuth(self.generate_token()))

what should it be:

  def _request(self, url, endpoint, payload, retrying_env=False, *args, **kwargs):
      log.debug(f'Sending request to {url}/{endpoint} with data {payload}')

      result = self._session.post(f"{url}/{endpoint}", json=payload, auth=BearerAuth(self.generate_token(*args, **kwargs)))

so in the case when using validate_device_token i can call it like this validate_device_token(token=token, force_refresh=True)
and that would validate the device token and force refresh it on every request.

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.