<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_json(self, json):
 """Set all attributes based on JSON response."""

        import time

        if 'access_token' in json:
            self.access_token = json['access_token']
            self.refresh_token = json['refresh_token']
            self.expires_in = json['expires_in']

            if 'authenticated' in json:
                self.authenticated = json['authenticated']
            else:
                self.authenticated = time.time()
        else:
            self.access_token = None