'Prepares a provider access token response. Arguments:
client_id       -- (str) OAuth ID for the client that requested
authentication.
client_secret   -- (str) OAuth secret for the client that requested
authentication.
expiration_time -- (datetime) Date and time after which the response
should be considered invalid.'

def prepare_access_token_body(self, client_key=None, client_secret=None, expiration_datetime=None, issue_datetime=None, nonce=None, issuer=None):

    body = {'access_token': 'foobar', 'token_type': 'bearer'}
    client_key = (client_key or self.client_key)
    client_secret = (client_secret or self.client_secret)
    now = datetime.datetime.utcnow()
    expiration_datetime = (expiration_datetime or (now + datetime.timedelta(seconds=30)))
    issue_datetime = (issue_datetime or now)
    nonce = (nonce or 'a-nonce')
    issuer = (issuer or self.issuer)
    id_token = self.get_id_token(client_key, timegm(expiration_datetime.utctimetuple()), timegm(issue_datetime.utctimetuple()), nonce, issuer)
    body['id_token'] = jwt.encode(id_token, client_secret, algorithm='HS256').decode('utf-8')
    return json.dumps(body)
