Files
openapi/auth.yaml
T

78 lines
1.8 KiB
YAML

swagger: '2.0'
info:
version: v1.0
title: Auth API
description: >-
Authentications provide security for your operations. This particular API
deals with your organization's login and operations with the Hanzo platform.
Your Users' logins are handled by the User API.
host: api.hanzo.io
schemes:
- https
consumes:
- application/json
produces:
- application/json
securityDefinitions:
oauth2:
type: oauth2
flow: password
scopes: {}
tokenUrl: 'https://api.hanzo.io/auth'
Authorization:
name: Authorization
type: apiKey
in: header
token:
name: token
type: apiKey
in: query
paths:
/auth:
get:
operationId: GET_auth
summary: /auth
description: >-
Password Grant requires username, password, client_id, grant_type =
"password". Refresh Grant requires refresh_token, grant_type = "refresh_token".
parameters:
- name: username
in: query
required: false
type: string
- name: password
in: query
required: false
type: string
- name: client_id
in: query
required: false
type: string
- name: grant_type
in: query
required: true
type: string
- name: refresh_token
in: query
required: false
type: string
responses:
'200':
description: ''
schema:
type: object
properties:
access_token:
type: string
token_type:
type: string
expires_in:
type: integer
refresh_token:
type: string
required:
- access_token
- token_type
- expires_in
- refresh_token