fixed token expiration parsing
parent
f56a993ca9
commit
3524350086
|
@ -52,10 +52,12 @@ public class OAuth2AccessTokenImpl implements OAuth2AccessToken {
|
||||||
}
|
}
|
||||||
|
|
||||||
DateFormat dateFormater = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ");
|
DateFormat dateFormater = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ");
|
||||||
try {
|
if (token.get("exp") != null) {
|
||||||
expireDate = dateFormater.parse(token.get("expires_at").getAsString());
|
try {
|
||||||
} catch (ParseException ex) {
|
expireDate = dateFormater.parse(token.get("exp").getAsString());
|
||||||
Logger.getLogger(IntrospectingTokenService.class.getName()).log(Level.SEVERE, null, ex);
|
} catch (ParseException ex) {
|
||||||
|
Logger.getLogger(IntrospectingTokenService.class.getName()).log(Level.SEVERE, null, ex);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue