Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • C cli
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4
    • Issues 4
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • funkwhalefunkwhale
  • cli
  • Merge requests
  • !17

Added OAuth login-method

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed EorlBruder requested to merge EorlBruder/cli:fix-1 into master Jun 21, 2021
  • Overview 14
  • Commits 3
  • Pipelines 4
  • Changes 5

Fixes #1

The following was implemented

  • Added separate method for the login. This method takes the client-id and client-secret as params.
  • Added method to refresh the oauth-token

Open questions/issues

  • Should this completly replace the basic-auth method?
    • In that case I would name the method login
    • Otherwise we should decide whether the oauth is the main method for this (being called login) or if basic-auth should be main
  • Should there be an option to provide the access-token from the application-details overview? It would probably be useful and users wouldn't need to authenticate (and specifically refresh) with the client-id and client-secret
  • For refreshing the token the client-id and secret need to be provided again, making that process kinda similar to the usual login. Maybe here it would be an idea to also save client and server id in the keyring and refresh automatically on auth-errors.
  • The docs need to be updated for this
  • There are no unit-tests for this functionality yet
Edited Jun 04, 2022 by EorlBruder
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: fix-1