From bfd5f69d7f028a48cb28059d742703e078084662 Mon Sep 17 00:00:00 2001 From: Steve C Date: Sat, 4 May 2013 13:28:04 -0500 Subject: [PATCH] Follow oauth2 expires_in spec. --- r2/r2/controllers/oauth2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r2/r2/controllers/oauth2.py b/r2/r2/controllers/oauth2.py index bee7608c7..49deb4ff3 100644 --- a/r2/r2/controllers/oauth2.py +++ b/r2/r2/controllers/oauth2.py @@ -218,7 +218,7 @@ class OAuth2AccessController(MinimalController): if access_token: resp["access_token"] = access_token._id resp["token_type"] = access_token.token_type - resp["expires_in"] = access_token._ttl + resp["expires_in"] = int(access_token._ttl) if access_token._ttl else None resp["scope"] = access_token.scope if refresh_token: resp["refresh_token"] = refresh_token._id