Api limit access to subscribers only

I have a vanilla php api(on a vds) and I want to make data coming from that api available to a few clients that are using a python app that’s also written by me. That python app is running on my client/s pc. But now i’m facing a problem: that app can be “pirated”.

How do I make sure that the access is limited to only my paid subscribers?

I know that “DRM” or copy protection won’t work therefore I was thinking about using tokens that are only available 1 day. And each call will send an Authorization header and based on that the api can decide what to do.

private function check_authorization(){     if(Server::exists('HTTP_AUTHORIZATION')){         $  credentials = preg_split('/[\s:]/', trim(Server::get('HTTP_AUTHORIZATION')));          //try to authenticate the user using those credentials          return true;     }     return false; }  

Now I was thinking about binding those tokens to 1 IP/day but then there’s the dynamic ip and the spoofing problem.

Also I was thinking about using something like Steam way to authenticate new devices for a user: new device? just send a 6 digits code trough email and ask the user to send it over to the api for confirmation. But if i can’t identify the device, other than its ip it’ll be pretty painful for those clients who happen to be less fortunate and have a dynamic ip.

Should i go as far as checking the operating system, maybe even get the mac and bind my tokens to those macs? Is that even possible?

Thank you!

can i calculate time of finding optimum of travel salesman problem with super computer and can i know that is limit of cities to now computers?

i want to know the real limit of our computational power that we have now what is the limit of cities that i can reach with optimum sol. i believe that first computer is 10^19 process in second

and can i calculate the time that it will take by looking to connections of directed graph ? and tell time by this power 10^19

as i can edit real graph of problem and delete cities of it

Is there an upper limit to the number of advantages you can have?

In Anima: Beyond Fantasy, at character generation, through Disadvantage use (up to the limit of three Disadvantages), you can end up with nine Creation Points with which to buy Advantages, many of which cost one Creation Point.

The sheet given by the devs has five slots for Advantages.

Is this an actual cap that I’ve missed, or just one of the many design flaws?

What is the reasonable upper limit of vis extraction for an established magus?

Using the core rule book, Covenants, and The Mysteries as sources, what is the reasonable upper limit of seasonal vim vis extraction of a hermetic alchemist that’s 75 years post gauntlet?

Considerations that appear to be synergistic are:

  • Lab specialization: vis extraction
  • Hermetic alchemy major virtue
  • House Verditus bonus to alchemy lab total

How to deal with long URLs in comments that exceed the 80 characters limit?

I generally try to adhere to the 80 character limit for each line of code to satisfy my colleagues, to satisfy the linting tools, and to maintain an image of professionalism when random people look at my code.

However, sometimes I have URLs that I wish to embed in the comments, and some of these URLs are very long (exceeding 80 characters). Exaggerated example: https://github.com/django/django/blob/42b9a23267f14be39b9b00958e18d5746783208e/django/contrib/auth/management/commands/changepassword.py#L17-L21

How do professional software engineers deal with this problem? Do they make an exception to the 80 characters rule for long URLs?

Does the UA Oath of Treachery paladin’s Cull the Herd ability (from the Aura of Treachery feature) have a limit on the number of times it can be used?

The UA Oath of Treachery paladin (from Unearthed Arcana: Paladin) gets the Aura of Treachery feature at 7th level, which gives them this benefit (in addition to another one, Treacherous Strike):

Cull the Herd. You have advantage on melee attack rolls against any creature that has one or more of its allies within 5 feet of it.

It does not specify for how long this ‘advantage’ lasts. Its wording, unlike Treacherous Strike, does not imply any exact limit on the number of times that one may utilise this ability – only a condition in which the advantage takes place.

The “you may use this ability up to three times per short rest” that comes immediately after Treacherous Strike also seems to support that Treacherous Strike is, by RAW, limited in its usage, which is further reinforced by Treacherous Strike’s own text.

Thus I believe that Cull the Herd doesn’t have a limit on the number of uses it has by RAW, but am wondering whether or not this interpretation is correct.