• Kirill Smelkov's avatar
    blob/auth: Teach it to handle HTTP Basic Auth too · 32ec77c4
    Kirill Smelkov authored
    There are cases when using user:password for /raw/... access is handy:
    
    - when using query for auth (private_token) is not convenient for some
      reason (e.g. client processing software does not handle queries well
      when generating URLs)
    
    - when we do not want to organize many artificial users and use their
      tokens, but instead just use per-project automatically setup
    
        gitlab-ci-token : <ci-token>
    
      artificial user & "password" which are already handled by auth backend
      for `git fetch` requests.
    
    Handling is easy: if main auth backend rejects access, and there is
    user:password in original request, we retry asking auth backend the way
    as `git fetch` would do.
    
    Access is granted if any of two ways to ask auth backend succeeds. This
    way both private tokens / cookies and HTTP auth are supported.
    32ec77c4
Name
Last commit
Last update
cmd Loading commit data...
internal Loading commit data...
support Loading commit data...
testdata Loading commit data...
.gitignore Loading commit data...
.gitlab-ci.yml Loading commit data...
CHANGELOG Loading commit data...
LICENSE Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
VERSION Loading commit data...
authorization_test.go Loading commit data...
main.go Loading commit data...
main_test.go Loading commit data...
proxy_test.go Loading commit data...
sendfile_test.go Loading commit data...
urlflag.go Loading commit data...