Skip to content
This repository has been archived by the owner on Nov 11, 2019. It is now read-only.

create new service releng_auth0 #975

Open
garbas opened this issue Mar 23, 2018 · 0 comments
Open

create new service releng_auth0 #975

garbas opened this issue Mar 23, 2018 · 0 comments

Comments

@garbas
Copy link
Contributor

garbas commented Mar 23, 2018

currently already 2 services implement auth0 functionality, releng_treestatus and shipit_uplict. Also coming releng_workflow service will need some sort of auth0.

create a simple service with 2 endpoints already implemented in backend_common package. A `api.yml should look like.

---
swagger: "2.0"
info:
  version: "0.1.0"
  title: "Releng Auth0 service"
consumes:
 - application/json
produces:
 - application/json
paths:

  /login:
    get:
      operationId: "backend_common.auth0.auth0_login"
      responses:
        200:
          description: A login URL to redirect the user to
          schema:
            type: string

  /check:
    post:
      operationId: "backend_common.auth0.auth0_check"
      responses:
        200:
          description: Auth0 tokens
          schema:
            $ref: '#/definitions/Auth0Tokens'

definitions:

  Auth0Tokens:
    type: object
    required:
      - expires
      - access_token
      - id_token
    properties:
      expires:
        type: integer
      access_token:
        type: string
      id_token:
        type: string
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant