Skip to content
Snippets Groups Projects

auth: Simplify authentication after changes in swh-web

3 unresolved threads

Token renewal workflow is now delegated to swh-web for commodity of use when a user wants to make authenticated API calls.

So remove no more needed code and update documentation regarding authentication.

Depends on swh-web!394 (closed)


Migrated from D3850 (view on Phabricator)

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
37 37 Commands:
38 38 login Login and create new offline OpenID Connect session.
39 39 logout Logout from an offline OpenID Connect session.
40 refresh Refresh an offline OpenID Connect session.
41 40
42 41 In order to get your tokens, you need to use the ``login`` subcommand of
43 42 that CLI tool by passing your username as argument. You will be prompted
44 43 for your password and if the authentication succeeds a new OpenID Connect
45 session will be created and tokens will be dumped in JSON format to standard
46 output.
44 session will be created and tokens will be dumped to standard output.
  • vlorentz
    vlorentz @vlorentz started a thread on the diff
  • 16 16 class AuthenticationError(Exception):
    17 17 """Authentication related error.
    18 18
    19 Example: A bearer token has expired.
    19 Example: A bearer token has been revoked.
  • vlorentz
    vlorentz @vlorentz started a thread on the diff
  • 135 132 Args:
    136 133 api_url: base URL for API calls (default:
    137 134 "https://archive.softwareheritage.org/api/1")
    138
    135 bearer_token: optional bearer token to do authenticated API calls
  • Merge request was accepted

  • vlorentz approved this merge request

    approved this merge request

  • Author Maintainer

    Update: Address @vlorentz comments

  • Build is green

    Patch application report for D3850 (id=13602)

    Rebasing onto ca947d48...

    Current branch diff-target is up to date.
    Changes applied before test
    commit f3d89ebc4ec1bcbb0b0de4cf9bdabab5ce1df09b
    Author: Antoine Lambert <antoine.lambert@inria.fr>
    Date:   Thu Aug 27 13:39:05 2020 +0200
    
        auth: Simplify authentication after changes in swh-web
        
        Token renewal workflow is now delegated to swh-web for commodity of use when
        a user wants to make authenticated API calls.
        
        So remove no more needed code and update documentation regarding authentication.

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

  • Author Maintainer

    Merge request was merged

  • Please register or sign in to reply
    Loading