mitchell852 commented on a change in pull request #3763: Oauth authentication rebase URL: https://github.com/apache/trafficcontrol/pull/3763#discussion_r308840135
########## File path: docs/source/api/user_login_oauth.rst ########## @@ -0,0 +1,81 @@ +.. +.. +.. Licensed under the Apache License, Version 2.0 (the "License"); +.. you may not use this file except in compliance with the License. +.. You may obtain a copy of the License at +.. +.. http://www.apache.org/licenses/LICENSE-2.0 +.. +.. Unless required by applicable law or agreed to in writing, software +.. distributed under the License is distributed on an "AS IS" BASIS, +.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.. See the License for the specific language governing permissions and +.. limitations under the License. +.. + +.. _to-api-user-login-oauth: + +******************** +``user/login/oauth`` +******************** +.. versionadded:: 1.4 + +``POST`` +======== + +Authentication of a user by exchanging a code for an encrypted JSON Web Token from an OAuth service. Traffic Ops will ``POST`` to the authCodeTokenUrl to exchange the code for an encrypted JSON Web Token. It will then decode and validate the token, validate the key set domain, and send back a session cookie. + +:Auth. Required: No +:Roles Required: None +:Response Type: ``undefined`` + +Request Structure +----------------- +:authCodeTokenUrl: URL for code-to-token conversion +:code: Code +:clientId: Client Id +:clientSecret: Client Secret +:redirectUri: Redirect URI + +.. code-block:: http + :caption: Request Example + + POST /api/1.4/user/login/oauth HTTP/1.1 + Host: trafficops.infra.ciab.test + User-Agent: curl/7.47.0 + Accept: */* + Cookie: mojolicious=... + Content-Length: 26 + Content-Type: application/json + + { + "authCodeTokenUrl": "https://url-to-convert-code-to-token.com", + "code": "AbCd123", + "clientId": "oauthClientId", + "clientSecret": "clientSecret", + "redirectUri": "https://traffic-portal.com/sso", Review comment: no, i think TP might be grumpy about it. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
