Page MenuHomeSoftware Heritage

django/models: Add new fields and dict profile getter to OIDCUser
ClosedPublic

Authored by anlambert on Mar 24 2021, 7:05 PM.

Details

Summary

Add fields "expires_in" and "refresh_expires_in" to OIDCUser model storing
the validity times for access and refresh tokens.

Add oidc_profile method to get the OpenID Connect profile associated to the
user as a dictionary.

Update and simplify tests for OIDCUser model.

Related to T3150

Diff Detail

Repository
rDAUTH Common authentication libraries
Branch
oidc-user-dict-profile-get
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 20182
Build 31329: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 31328: arc lint + arc unit

Event Timeline

Build is green

Patch application report for D5325 (id=19092)

Rebasing onto 8a5681a7aa...

Current branch diff-target is up to date.
Changes applied before test
commit e4ff8cabb56ffec727582841491a7d0c702162b5
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Wed Mar 24 19:01:49 2021 +0100

    django/models: Add new fields and dict profile getter to OIDCUser
    
    Add fields "expires_in" and "refresh_expires_in" to OIDCUser model storing
    the validity times for access and refresh tokens.
    
    Add oidc_profile method to get the OpenID Connect profile associated to the
    user as a dictionary.
    
    Update and simplify tests for OIDCUser model.
    
    Related to T3150

See https://jenkins.softwareheritage.org/job/DAUTH/job/tests-on-diff/49/ for more details.

Update: Make oidc_profile a property instead of a method

Build is green

Patch application report for D5325 (id=19093)

Rebasing onto 8a5681a7aa...

Current branch diff-target is up to date.
Changes applied before test
commit 13a56100ba0418a13c29cf7adcd0eac0fbce1009
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Wed Mar 24 19:01:49 2021 +0100

    django/models: Add new fields and oidc_profile property to OIDCUser
    
    Add fields "expires_in" and "refresh_expires_in" to OIDCUser model storing
    the validity times for access and refresh tokens.
    
    Add oidc_profile property to get the OpenID Connect profile associated to
    the user as a dictionary.
    
    Update and simplify tests for OIDCUser model.
    
    Related to T3150

See https://jenkins.softwareheritage.org/job/DAUTH/job/tests-on-diff/50/ for more details.

ardumont added a subscriber: ardumont.

great, thanks.

This revision is now accepted and ready to land.Mar 25 2021, 9:25 AM