public void update ( JSONObject json ) { accessToken = json . getString ( ACCESS_TOKEN ) ; tokenType = json . getString ( TOKEN_TYPE ) ; expiresAt = calculateExpiresAt ( json ) ; if ( json . has ( OAuth2 . REFRESH_TOKEN ) ) { refreshToken = json . getString ( OAuth2 . REFRESH_TOKEN ) ; } }
Update the credentials from a JSON request response .