diff options
| author | Dave Hibberd <hibby@debian.org> | 2024-10-11 15:42:00 +0100 |
|---|---|---|
| committer | Dave Hibberd <hibby@debian.org> | 2024-10-11 15:42:00 +0100 |
| commit | f527c60884771102fa4cc94096e1c253cace5997 (patch) | |
| tree | 6633bb3c2ea7442d17c0c3c64a5327e214e3ae6e /nodeapi.c | |
| parent | ba9f74d1b8b94f7c5ee99e863f72aa33fb70ae6f (diff) | |
| parent | 3de6b0150f1b06256a0ee3ce9a8ba529a5d306e8 (diff) | |
Merge branch 'debian/latest' into hibbian/latest
Diffstat (limited to 'nodeapi.c')
| -rw-r--r-- | nodeapi.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -158,13 +158,12 @@ int APIProcessHTTPMessage(char * response, char * Method, char * URL, char * req int request_token(char * response)
{
Token * token = generate_token();
- int expires_in = 3600;
char scope[] = "create";
printf("Token generated: %s\n", token->token);
- sprintf(response, "{\"access_token\":\"%s\", \"expires_in\":%d, \"scope\":\"create\"}\r\n",
- token->token, expires_in);
+ sprintf(response, "{\"access_token\":\"%s\", \"expires_at\":%ld,\"scope\":\"create\"}\r\n",
+ token->token, token->expiration_time);
return strlen(response);
}
|
