superstreamlabs / memphis-rest-gateway

Produce messages using REST to Memphis.dev station
https://docs.memphis.dev
Other
11 stars 7 forks source link

unclear return type for auth/authenticate and auth/refreshToken #67

Open afmahmuda opened 6 months ago

afmahmuda commented 6 months ago

When creating a token (and refreshing), you will receive the following JSON response:

{
    "expires_in": 102800324040000,
    "jwt": "xxx",
    "jwt_refresh_token": "yyy",
    "refresh_token_expires_in": 102800324040000
}

The expires_in and refresh_token_expires_in values are actually Unix timestamps of the expiration time, multiplied by 60 and then by 1000. This information might not be explicitly mentioned in the documentation and can be confusing.

Your proposal to either update the documentation or change the field names to expires_at and refresh_token_expires_at, using Unix timestamps directly, seems like a practical improvement.

afmahmuda commented 6 months ago

im sorry the branch were polluted by https://github.com/memphisdev/memphis-rest-gateway/pull/66