Giter Site home page Giter Site logo

Update for API Keys about clarifai-php HOT 8 CLOSED

jaredl531 avatar jaredl531 commented on May 27, 2024 1
Update for API Keys

from clarifai-php.

Comments (8)

darrynten avatar darrynten commented on May 27, 2024 2

@clone1018 I need you to please make the change to #46 so that we can merge this in and release. Thank you.

from clarifai-php.

nzsakib avatar nzsakib commented on May 27, 2024

Agree ,
I cannot use the library anymore as I don't have any CLIENT_ID/ SECRET keys.

Please implement the API keys.

from clarifai-php.

eddiezane avatar eddiezane commented on May 27, 2024

@darrynten - I started taking a stab at implementing this and saw that we're currently using /v1/token for every request

private function requestToken()
{
$tokenResponse = $this->handleRequest(
'POST',
$this->url . '/v1/token', // endpoint is available only in v1
[
'form_params' => [
'grant_type' => 'client_credentials',
'client_id' => $this->clientId,
'client_secret' => $this->clientSecret,
],
]
);
$this->tokenExpireTime->modify(
sprintf('+%s seconds', $tokenResponse['expires_in'])
);
$this->token = $tokenResponse['access_token'];
$this->tokenType = $tokenResponse['token_type'];
}

API Keys do not work with this endpoint/session tokens.

We're still finalizing plans but will most likely be moving to dropping v1 support by the end of this year. Also all newly created apps only have API keys (which it seems @nzsakib encountered above).

I see two options:

  • Add logic to handle not grabbing a session token if we're using an API Key
  • Drop support early for v1

What are your thoughts?

from clarifai-php.

darrynten avatar darrynten commented on May 27, 2024

@mxnr @vojtik do you guys perhaps have any ideas around this?

from clarifai-php.

darrynten avatar darrynten commented on May 27, 2024

Hi @eddiezane and @jared-clarifai

There is a PR open #46 that lays some groundwork for this, but it breaks backwards compatibility.

On that note, and regarding:

We're still finalizing plans but will most likely be moving to dropping v1 support by the end of this year.

Does this mean that any and all production apps in the wild will be broken come Jan 1 if they are not migrated to API keys, or will they be "grandfathered"?

Keen to get this resolved 🚀

from clarifai-php.

eddiezane avatar eddiezane commented on May 27, 2024

@darrynten will take a look at the PR.

Does this mean that any and all production apps in the wild will be broken come Jan 1 if they are not migrated to API keys, or will they be "grandfathered"?

That is all still being discussed and worked out but my gut feeling is we'll be turning off support completely and there will be plenty of notice and an upgrade path.

from clarifai-php.

darrynten avatar darrynten commented on May 27, 2024

Hi all, PR #46 is close to being ready, there are only some minor change requests left.

from clarifai-php.

darrynten avatar darrynten commented on May 27, 2024

This was just resolved!

A new release, 1.0.0 has been published.

Thanks to @jared-clarifai @unclecheese and @clone1018

#49

from clarifai-php.

Related Issues (9)

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.