idp integration for mcs (#75)

This PR adds support for oidc in  mcs, to enable idp
authentication you need to pass the following environment variables and
restart mcs.

```
MCS_IDP_URL=""
MCS_IDP_CLIENT_ID=""
MCS_IDP_SECRET=""
MCS_IDP_CALLBACK=""
```
This commit is contained in:
Lenin Alevski
2020-05-01 08:38:52 -07:00
committed by GitHub
parent f3d7e61ddb
commit 44d8e9b975
36 changed files with 2276 additions and 80 deletions

View File

@@ -61,6 +61,29 @@ paths:
tags:
- UserAPI
/login/oauth2/auth:
post:
summary: Identity Provider oauth2 callback endpoint.
operationId: LoginOauth2Auth
parameters:
- name: body
in: body
required: true
schema:
$ref: '#/definitions/loginOauth2AuthRequest'
responses:
201:
description: A successful login.
schema:
$ref: '#/definitions/loginResponse'
default:
description: Generic error response.
schema:
$ref: "#/definitions/error"
security: []
tags:
- UserAPI
/logout:
post:
summary: Logout from mcs.
@@ -761,7 +784,6 @@ paths:
$ref: "#/definitions/error"
tags:
- AdminAPI
/profiling/start:
post:
summary: Start recording profile data
@@ -1179,6 +1201,16 @@ definitions:
enum: [form,redirect]
redirect:
type: string
loginOauth2AuthRequest:
type: object
required:
- state
- code
properties:
state:
type: string
code:
type: string
loginRequest:
type: object
required: