Projet

Général

Profil

0001-oidc-always-gives-integer-for-expires_in-values-4027.patch

Frédéric Péters, 28 février 2020 16:08

Télécharger (1,7 ko)

Voir les différences:

Subject: [PATCH] oidc: always gives integer for expires_in values (#40273)

 src/authentic2_idp_oidc/views.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
src/authentic2_idp_oidc/views.py
355 355
            params.update({
356 356
                'access_token': access_token.uuid,
357 357
                'token_type': 'Bearer',
358
                'expires_in': expires_in.total_seconds(),
358
                'expires_in': int(expires_in.total_seconds()),
359 359
            })
360 360
        # query is transfered through the hashtag
361 361
        response = redirect(request, redirect_uri + '#%s' % urlencode(params), resolve=False)
......
521 521
    return JsonResponse({
522 522
        'access_token': six.text_type(access_token.uuid),
523 523
        'token_type': 'Bearer',
524
        'expires_in': expires_in.total_seconds(),
524
        'expires_in': int(expires_in.total_seconds()),
525 525
        'id_token': utils.make_idtoken(client, id_token),
526 526
    })
527 527

  
......
577 577
    return JsonResponse({
578 578
        'access_token': six.text_type(access_token.uuid),
579 579
        'token_type': 'Bearer',
580
        'expires_in': expires_in.total_seconds(),
580
        'expires_in': int(expires_in.total_seconds()),
581 581
        'id_token': utils.make_idtoken(client, id_token),
582 582
    })
583 583

  
584
-