koding / kite.js

Kite client in JavaScript
kite.koding.com
MIT License
75 stars 16 forks source link

We need to implement a mechanism for token renewal #10

Closed cenkalti closed 10 years ago

humanchimp commented 10 years ago

OK, will do. Nice catch since we're not generally testing things for longer than 1 hour at a time, but this problem will become apparent soon after deploying to production

humanchimp commented 10 years ago

Seems like the generateToken method takes the string key. Since we're dealing in query objects on the client, I'd like to change the signature so that it takes a KontrolQuery instead of a string query key. What say you @cenkalti ?

cenkalti commented 10 years ago

In fact, the method's name is getToken not generateToken and, it takes a single query parameter:

[{username: "koding", environment: "production", name: "os", ...}]
humanchimp commented 10 years ago

Ah, OK... I was trying to understand from the source. Seems like my mistake.

cenkalti commented 10 years ago

Here is where the methods are registered: https://github.com/koding/kite/blob/master/kontrol/kontrol.go#L104

humanchimp commented 10 years ago

OK, thanks. Let's move the discussion over to #11