{ "swagger": "2.0", "info": { "version": "1.0.0", "title": "Security Implimentation", "description": "implimenting security related features.\n" }, "host": "people.apigee.io", "schemes": [ "https", "http" ], "paths": { "/basicauth": { "post": { "tags": [ "basicauth" ], "description": "Get access token.\n", "consumes": [ "application/x-www-form-urlencoded" ], "produces": [ "application/json" ], "parameters": [{ "name": "grant_type", "in": "formData", "required": true, "type": "string" }], "responses": { "200": { "description": "Successful response" } }, "security": [{ "basicAuth": [] }] } }, "/apikey": { "get": { "tags": [ "apikey" ], "description": "passing consumer id to get solution", "produces": [ "application/json" ], "parameters": [{ "name": "api_key", "in": "header", "required": true, "type": "string" }], "responses": { "200": { "description": "successfully authenticated" } }, "security": [{ "api_key": [] }] } }, "/oauth": { "get": { "tags": [ "access" ], "description": "passing access token as a key", "consumes": [ "application/json", "application/xml" ], "produces": [ "application/xml", "application/json" ], "parameters": [{ "in": "header", "name": "accesstoken", "required": true, "type": "string" }], "responses": { "405": { "description": "Invalid input" } }, "security": [{ "access_auth": [ "read", "write" ] }] } } }, "securityDefinitions": { "basicAuth": { "type": "basic" }, "api_key": { "type": "apiKey", "name": "api_key", "in": "header" }, "access_auth": { "type": "oauth2", "flow": "application", "tokenUrl": "https://example.com/oauth/token", "scopes": { "read": "Grants read access", "write": "Grants write access" } } } }