RelationalAI / rai-sdk-python

The RelationalAI Software Development Kit (SDK) for Python.
Apache License 2.0
17 stars 4 forks source link

Implemented the client credentials along with the access key credentials #6

Closed miazamrai closed 3 years ago

miazamrai commented 3 years ago

Description:

larf311 commented 3 years ago

If both credentials are found, then it will use the access key credentials.

I'd probably throw an exception here. I could see someone banging their head against the wall expecting to use oauth and instead using the access key

larf311 commented 3 years ago

Do we need to cache the token so that we don't get a new token each time?

Yes.

miazamrai commented 3 years ago

If both credentials are found, then it will use the access key credentials.

I'd probably throw an exception here. I could see someone banging their head against the wall expecting to use oauth and instead using the access key

If both credentials are found, then it will use the access key credentials.

I'd probably throw an exception here. I could see someone banging their head against the wall expecting to use oauth and instead using the access key

Hehe! Actually, in case of multiple credentials, the caller won't know which credentials have been used, unless they are wrong. There won't be any difference in the output.

Yes, it is a good idea to raise exception if there are multiple credentials in the file. I have updated the read config function to read all the credentials and then raise exception if there are multiple credentials.

miazamrai commented 3 years ago

Do we need to cache the token so that we don't get a new token each time?

Yes.

Done