Page MenuHomeSoftware Heritage

cli: Add commands to generate and revoke bearer tokens
ClosedPublic

Authored by anlambert on Jul 1 2021, 12:00 PM.

Details

Summary

Migrate auth command group from swh-web-client package to the
swh-auth package.

Related to T3385

Related to D5955

Diff Detail

Repository
rDAUTH Common authentication libraries
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build is green

Patch application report for D5954 (id=21383)

Rebasing onto b219038a6c...

Current branch diff-target is up to date.
Changes applied before test
commit e6e01fbfccead42ddaeb9c3b9c4646477fe0a844
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Tue Jun 29 18:04:08 2021 +0200

    cli: Add commands to generate and revoke bearer tokens
    
    Migrate auth command group from swh-web-client package to the
    swh-auth package.
    
    Related to T3385

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

Great!

Some suggestions inline.

I gather some documentation update will happen later when
this is effectively the new way of generating token.

swh/auth/cli.py
69
swh/auth/tests/test_cli.py
53

to make it clear that's representing the user's input.

56

to be consistent ;)

This revision is now accepted and ready to land.Jul 1 2021, 1:57 PM

Update:

  • address @ardumont comments
  • add CLI section in swh-auth documentation

Build is green

Patch application report for D5954 (id=21399)

Rebasing onto b219038a6c...

Current branch diff-target is up to date.
Changes applied before test
commit 2da72f399b4d36a866d2d42e05681dd8d04b1a2b
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Tue Jun 29 18:04:08 2021 +0200

    cli: Add commands to generate and revoke bearer tokens
    
    Migrate auth command group from swh-web-client package to the
    swh-auth package.
    
    Related to T3385

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