summaryrefslogtreecommitdiff
path: root/lib/api/files.rb
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2016-08-18 23:00:54 +0000
committerRobert Speicher <robert@gitlab.com>2016-08-18 23:00:54 +0000
commit7b926c6eb42ebe8aaeda71e0e2e8a16e8da53504 (patch)
tree82d2f0bd04a10c8cd77cad4617ed7b6d7161cadd /lib/api/files.rb
parente26ce27d5bac302785086d426e7b1a4c5b33f74a (diff)
parenta4137411c62d093a55dc171665dc90325182bb04 (diff)
downloadgitlab-ce-7b926c6eb42ebe8aaeda71e0e2e8a16e8da53504.tar.gz
Merge branch '2fa-api-check' into 'master'
2FA checks for API workflows ## What does this MR do? It adds a check to the API `/session` endpoint that will deny authentication requests to users that have 2FA enabled. In the error message it will instruct them to use a Personal Access Token instead. It adds a check to the `/oauth/token` endpoint, when `grant_type: 'password'` is used, so that no OAuth2 access token can be generated if the user has 2FA enabled. This endpoint should not be used by OAuth applications, anyway. OAuth apps should follow the flow of redirecting the user to GitLab, where 2FA access restrictions apply and logging them in there. Once successfully authenticated, the OAuth token is passed to the client. ## Why was this MR needed? No 2FA check on API endpoints. ## What are the relevant issue numbers? Fixes #2979 See merge request !5820
Diffstat (limited to 'lib/api/files.rb')
0 files changed, 0 insertions, 0 deletions