weavejester / ring-oauth2

OAuth 2.0 client middleware for Ring
146 stars 38 forks source link

expires_in is not a number, coming from Microsoft Azure #13

Closed ingesolvoll closed 6 years ago

ingesolvoll commented 6 years ago

In format-access-token, the expires_in value I get from the authorization server is the string "3600". The code assumes it can be passed directly to clj-time/seconds as a number, resulting in a ClassCastException. This may be because Microsoft is not following the standard/convention/spec, from some basic googling I see JSON examples showing a number in this field, not a string.

Is this something you would consider supporting in this middelware?

ingesolvoll commented 6 years ago

Turns out this is a problem in the previous version of the endpoint. The v2.0 url has expires_in as a number, the endpoint without v2.0 has a string. I'll close this and leave it in case anyone else runs into this.