mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 06:39:48 +00:00
This commit is contained in:
parent
2401788509
commit
3a944d9dec
@ -27,6 +27,8 @@
|
|||||||
"apiKey": "apiKey",
|
"apiKey": "apiKey",
|
||||||
"base_path": "/v2",
|
"base_path": "/v2",
|
||||||
"host": "petstore.swagger.io",
|
"host": "petstore.swagger.io",
|
||||||
|
"oauth2ClientId": "clientId",
|
||||||
|
"oauth2RedirectUrl": "http://localhost/",
|
||||||
"scheme": "http"
|
"scheme": "http"
|
||||||
},
|
},
|
||||||
"name": "OpenAPI env",
|
"name": "OpenAPI env",
|
||||||
@ -35,7 +37,14 @@
|
|||||||
{
|
{
|
||||||
"_id": "req___WORKSPACE_ID__23acbe44",
|
"_id": "req___WORKSPACE_ID__23acbe44",
|
||||||
"_type": "request",
|
"_type": "request",
|
||||||
"authentication": {},
|
"authentication": {
|
||||||
|
"authorizationUrl": "http://petstore.swagger.io/oauth/dialog",
|
||||||
|
"clientId": "{{ oauth2ClientId }}",
|
||||||
|
"grantType": "implicit",
|
||||||
|
"redirectUrl": "{{ oauth2RedirectUrl }}",
|
||||||
|
"scope": "write:pets read:pets",
|
||||||
|
"type": "oauth2"
|
||||||
|
},
|
||||||
"body": {
|
"body": {
|
||||||
"mimeType": "application/json",
|
"mimeType": "application/json",
|
||||||
"text": "{\n \"id\": 0,\n \"category\": {\n \"id\": 0,\n \"name\": \"string\"\n },\n \"name\": \"doggie\",\n \"photoUrls\": [\n \"string\"\n ],\n \"tags\": [\n {\n \"id\": 0,\n \"name\": \"string\"\n }\n ],\n \"status\": \"string\"\n}"
|
"text": "{\n \"id\": 0,\n \"category\": {\n \"id\": 0,\n \"name\": \"string\"\n },\n \"name\": \"doggie\",\n \"photoUrls\": [\n \"string\"\n ],\n \"tags\": [\n {\n \"id\": 0,\n \"name\": \"string\"\n }\n ],\n \"status\": \"string\"\n}"
|
||||||
@ -50,7 +59,14 @@
|
|||||||
{
|
{
|
||||||
"_id": "req___WORKSPACE_ID__74a7a059",
|
"_id": "req___WORKSPACE_ID__74a7a059",
|
||||||
"_type": "request",
|
"_type": "request",
|
||||||
"authentication": {},
|
"authentication": {
|
||||||
|
"authorizationUrl": "http://petstore.swagger.io/oauth/dialog",
|
||||||
|
"clientId": "{{ oauth2ClientId }}",
|
||||||
|
"grantType": "implicit",
|
||||||
|
"redirectUrl": "{{ oauth2RedirectUrl }}",
|
||||||
|
"scope": "write:pets read:pets",
|
||||||
|
"type": "oauth2"
|
||||||
|
},
|
||||||
"body": {
|
"body": {
|
||||||
"mimeType": "application/json",
|
"mimeType": "application/json",
|
||||||
"text": "{\n \"id\": 0,\n \"category\": {\n \"id\": 0,\n \"name\": \"string\"\n },\n \"name\": \"doggie\",\n \"photoUrls\": [\n \"string\"\n ],\n \"tags\": [\n {\n \"id\": 0,\n \"name\": \"string\"\n }\n ],\n \"status\": \"string\"\n}"
|
"text": "{\n \"id\": 0,\n \"category\": {\n \"id\": 0,\n \"name\": \"string\"\n },\n \"name\": \"doggie\",\n \"photoUrls\": [\n \"string\"\n ],\n \"tags\": [\n {\n \"id\": 0,\n \"name\": \"string\"\n }\n ],\n \"status\": \"string\"\n}"
|
||||||
@ -65,7 +81,14 @@
|
|||||||
{
|
{
|
||||||
"_id": "req___WORKSPACE_ID__80ab0d08",
|
"_id": "req___WORKSPACE_ID__80ab0d08",
|
||||||
"_type": "request",
|
"_type": "request",
|
||||||
"authentication": {},
|
"authentication": {
|
||||||
|
"authorizationUrl": "http://petstore.swagger.io/oauth/dialog",
|
||||||
|
"clientId": "{{ oauth2ClientId }}",
|
||||||
|
"grantType": "implicit",
|
||||||
|
"redirectUrl": "{{ oauth2RedirectUrl }}",
|
||||||
|
"scope": "write:pets read:pets",
|
||||||
|
"type": "oauth2"
|
||||||
|
},
|
||||||
"body": {},
|
"body": {},
|
||||||
"headers": [],
|
"headers": [],
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
@ -83,7 +106,14 @@
|
|||||||
{
|
{
|
||||||
"_id": "req___WORKSPACE_ID__42a17980",
|
"_id": "req___WORKSPACE_ID__42a17980",
|
||||||
"_type": "request",
|
"_type": "request",
|
||||||
"authentication": {},
|
"authentication": {
|
||||||
|
"authorizationUrl": "http://petstore.swagger.io/oauth/dialog",
|
||||||
|
"clientId": "{{ oauth2ClientId }}",
|
||||||
|
"grantType": "implicit",
|
||||||
|
"redirectUrl": "{{ oauth2RedirectUrl }}",
|
||||||
|
"scope": "write:pets read:pets",
|
||||||
|
"type": "oauth2"
|
||||||
|
},
|
||||||
"body": {},
|
"body": {},
|
||||||
"headers": [],
|
"headers": [],
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
@ -119,7 +149,14 @@
|
|||||||
{
|
{
|
||||||
"_id": "req___WORKSPACE_ID__a4608701",
|
"_id": "req___WORKSPACE_ID__a4608701",
|
||||||
"_type": "request",
|
"_type": "request",
|
||||||
"authentication": {},
|
"authentication": {
|
||||||
|
"authorizationUrl": "http://petstore.swagger.io/oauth/dialog",
|
||||||
|
"clientId": "{{ oauth2ClientId }}",
|
||||||
|
"grantType": "implicit",
|
||||||
|
"redirectUrl": "{{ oauth2RedirectUrl }}",
|
||||||
|
"scope": "write:pets read:pets",
|
||||||
|
"type": "oauth2"
|
||||||
|
},
|
||||||
"body": {
|
"body": {
|
||||||
"mimeType": "application/x-www-form-urlencoded"
|
"mimeType": "application/x-www-form-urlencoded"
|
||||||
},
|
},
|
||||||
@ -133,7 +170,14 @@
|
|||||||
{
|
{
|
||||||
"_id": "req___WORKSPACE_ID__e804bd05",
|
"_id": "req___WORKSPACE_ID__e804bd05",
|
||||||
"_type": "request",
|
"_type": "request",
|
||||||
"authentication": {},
|
"authentication": {
|
||||||
|
"authorizationUrl": "http://petstore.swagger.io/oauth/dialog",
|
||||||
|
"clientId": "{{ oauth2ClientId }}",
|
||||||
|
"grantType": "implicit",
|
||||||
|
"redirectUrl": "{{ oauth2RedirectUrl }}",
|
||||||
|
"scope": "write:pets read:pets",
|
||||||
|
"type": "oauth2"
|
||||||
|
},
|
||||||
"body": {},
|
"body": {},
|
||||||
"headers": [
|
"headers": [
|
||||||
{
|
{
|
||||||
@ -151,7 +195,14 @@
|
|||||||
{
|
{
|
||||||
"_id": "req___WORKSPACE_ID__8081fb6f",
|
"_id": "req___WORKSPACE_ID__8081fb6f",
|
||||||
"_type": "request",
|
"_type": "request",
|
||||||
"authentication": {},
|
"authentication": {
|
||||||
|
"authorizationUrl": "http://petstore.swagger.io/oauth/dialog",
|
||||||
|
"clientId": "{{ oauth2ClientId }}",
|
||||||
|
"grantType": "implicit",
|
||||||
|
"redirectUrl": "{{ oauth2RedirectUrl }}",
|
||||||
|
"scope": "write:pets read:pets",
|
||||||
|
"type": "oauth2"
|
||||||
|
},
|
||||||
"body": {
|
"body": {
|
||||||
"mimeType": "multipart/form-data"
|
"mimeType": "multipart/form-data"
|
||||||
},
|
},
|
||||||
|
@ -27,6 +27,8 @@
|
|||||||
"apiKey": "apiKey",
|
"apiKey": "apiKey",
|
||||||
"base_path": "/v2",
|
"base_path": "/v2",
|
||||||
"host": "petstore.swagger.io",
|
"host": "petstore.swagger.io",
|
||||||
|
"oauth2ClientId": "clientId",
|
||||||
|
"oauth2RedirectUrl": "http://localhost/",
|
||||||
"scheme": "http"
|
"scheme": "http"
|
||||||
},
|
},
|
||||||
"name": "OpenAPI env",
|
"name": "OpenAPI env",
|
||||||
@ -59,7 +61,14 @@
|
|||||||
{
|
{
|
||||||
"_id": "req___WORKSPACE_ID__23acbe44",
|
"_id": "req___WORKSPACE_ID__23acbe44",
|
||||||
"_type": "request",
|
"_type": "request",
|
||||||
"authentication": {},
|
"authentication": {
|
||||||
|
"authorizationUrl": "http://petstore.swagger.io/oauth/dialog",
|
||||||
|
"clientId": "{{ oauth2ClientId }}",
|
||||||
|
"grantType": "implicit",
|
||||||
|
"redirectUrl": "{{ oauth2RedirectUrl }}",
|
||||||
|
"scope": "write:pets read:pets",
|
||||||
|
"type": "oauth2"
|
||||||
|
},
|
||||||
"body": {
|
"body": {
|
||||||
"mimeType": "application/json",
|
"mimeType": "application/json",
|
||||||
"text": "{\n \"id\": 0,\n \"category\": {\n \"id\": 0,\n \"name\": \"string\"\n },\n \"name\": \"doggie\",\n \"photoUrls\": [\n \"string\"\n ],\n \"tags\": [\n {\n \"id\": 0,\n \"name\": \"string\"\n }\n ],\n \"status\": \"string\"\n}"
|
"text": "{\n \"id\": 0,\n \"category\": {\n \"id\": 0,\n \"name\": \"string\"\n },\n \"name\": \"doggie\",\n \"photoUrls\": [\n \"string\"\n ],\n \"tags\": [\n {\n \"id\": 0,\n \"name\": \"string\"\n }\n ],\n \"status\": \"string\"\n}"
|
||||||
@ -74,7 +83,14 @@
|
|||||||
{
|
{
|
||||||
"_id": "req___WORKSPACE_ID__74a7a059",
|
"_id": "req___WORKSPACE_ID__74a7a059",
|
||||||
"_type": "request",
|
"_type": "request",
|
||||||
"authentication": {},
|
"authentication": {
|
||||||
|
"authorizationUrl": "http://petstore.swagger.io/oauth/dialog",
|
||||||
|
"clientId": "{{ oauth2ClientId }}",
|
||||||
|
"grantType": "implicit",
|
||||||
|
"redirectUrl": "{{ oauth2RedirectUrl }}",
|
||||||
|
"scope": "write:pets read:pets",
|
||||||
|
"type": "oauth2"
|
||||||
|
},
|
||||||
"body": {
|
"body": {
|
||||||
"mimeType": "application/json",
|
"mimeType": "application/json",
|
||||||
"text": "{\n \"id\": 0,\n \"category\": {\n \"id\": 0,\n \"name\": \"string\"\n },\n \"name\": \"doggie\",\n \"photoUrls\": [\n \"string\"\n ],\n \"tags\": [\n {\n \"id\": 0,\n \"name\": \"string\"\n }\n ],\n \"status\": \"string\"\n}"
|
"text": "{\n \"id\": 0,\n \"category\": {\n \"id\": 0,\n \"name\": \"string\"\n },\n \"name\": \"doggie\",\n \"photoUrls\": [\n \"string\"\n ],\n \"tags\": [\n {\n \"id\": 0,\n \"name\": \"string\"\n }\n ],\n \"status\": \"string\"\n}"
|
||||||
@ -89,7 +105,14 @@
|
|||||||
{
|
{
|
||||||
"_id": "req___WORKSPACE_ID__80ab0d08",
|
"_id": "req___WORKSPACE_ID__80ab0d08",
|
||||||
"_type": "request",
|
"_type": "request",
|
||||||
"authentication": {},
|
"authentication": {
|
||||||
|
"authorizationUrl": "http://petstore.swagger.io/oauth/dialog",
|
||||||
|
"clientId": "{{ oauth2ClientId }}",
|
||||||
|
"grantType": "implicit",
|
||||||
|
"redirectUrl": "{{ oauth2RedirectUrl }}",
|
||||||
|
"scope": "write:pets read:pets",
|
||||||
|
"type": "oauth2"
|
||||||
|
},
|
||||||
"body": {},
|
"body": {},
|
||||||
"headers": [],
|
"headers": [],
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
@ -107,7 +130,14 @@
|
|||||||
{
|
{
|
||||||
"_id": "req___WORKSPACE_ID__42a17980",
|
"_id": "req___WORKSPACE_ID__42a17980",
|
||||||
"_type": "request",
|
"_type": "request",
|
||||||
"authentication": {},
|
"authentication": {
|
||||||
|
"authorizationUrl": "http://petstore.swagger.io/oauth/dialog",
|
||||||
|
"clientId": "{{ oauth2ClientId }}",
|
||||||
|
"grantType": "implicit",
|
||||||
|
"redirectUrl": "{{ oauth2RedirectUrl }}",
|
||||||
|
"scope": "write:pets read:pets",
|
||||||
|
"type": "oauth2"
|
||||||
|
},
|
||||||
"body": {},
|
"body": {},
|
||||||
"headers": [],
|
"headers": [],
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
@ -143,7 +173,14 @@
|
|||||||
{
|
{
|
||||||
"_id": "req___WORKSPACE_ID__a4608701",
|
"_id": "req___WORKSPACE_ID__a4608701",
|
||||||
"_type": "request",
|
"_type": "request",
|
||||||
"authentication": {},
|
"authentication": {
|
||||||
|
"authorizationUrl": "http://petstore.swagger.io/oauth/dialog",
|
||||||
|
"clientId": "{{ oauth2ClientId }}",
|
||||||
|
"grantType": "implicit",
|
||||||
|
"redirectUrl": "{{ oauth2RedirectUrl }}",
|
||||||
|
"scope": "write:pets read:pets",
|
||||||
|
"type": "oauth2"
|
||||||
|
},
|
||||||
"body": {
|
"body": {
|
||||||
"mimeType": "application/x-www-form-urlencoded"
|
"mimeType": "application/x-www-form-urlencoded"
|
||||||
},
|
},
|
||||||
@ -157,7 +194,14 @@
|
|||||||
{
|
{
|
||||||
"_id": "req___WORKSPACE_ID__e804bd05",
|
"_id": "req___WORKSPACE_ID__e804bd05",
|
||||||
"_type": "request",
|
"_type": "request",
|
||||||
"authentication": {},
|
"authentication": {
|
||||||
|
"authorizationUrl": "http://petstore.swagger.io/oauth/dialog",
|
||||||
|
"clientId": "{{ oauth2ClientId }}",
|
||||||
|
"grantType": "implicit",
|
||||||
|
"redirectUrl": "{{ oauth2RedirectUrl }}",
|
||||||
|
"scope": "write:pets read:pets",
|
||||||
|
"type": "oauth2"
|
||||||
|
},
|
||||||
"body": {},
|
"body": {},
|
||||||
"headers": [
|
"headers": [
|
||||||
{
|
{
|
||||||
@ -175,7 +219,14 @@
|
|||||||
{
|
{
|
||||||
"_id": "req___WORKSPACE_ID__8081fb6f",
|
"_id": "req___WORKSPACE_ID__8081fb6f",
|
||||||
"_type": "request",
|
"_type": "request",
|
||||||
"authentication": {},
|
"authentication": {
|
||||||
|
"authorizationUrl": "http://petstore.swagger.io/oauth/dialog",
|
||||||
|
"clientId": "{{ oauth2ClientId }}",
|
||||||
|
"grantType": "implicit",
|
||||||
|
"redirectUrl": "{{ oauth2RedirectUrl }}",
|
||||||
|
"scope": "write:pets read:pets",
|
||||||
|
"type": "oauth2"
|
||||||
|
},
|
||||||
"body": {
|
"body": {
|
||||||
"mimeType": "multipart/form-data"
|
"mimeType": "multipart/form-data"
|
||||||
},
|
},
|
||||||
|
@ -39,7 +39,6 @@ components:
|
|||||||
in: query
|
in: query
|
||||||
OAuth2-AuthorizationCode:
|
OAuth2-AuthorizationCode:
|
||||||
type: oauth2
|
type: oauth2
|
||||||
scheme: bearer
|
|
||||||
flows:
|
flows:
|
||||||
authorizationCode:
|
authorizationCode:
|
||||||
authorizationUrl: https://api.server.test/v1/auth
|
authorizationUrl: https://api.server.test/v1/auth
|
||||||
@ -49,7 +48,6 @@ components:
|
|||||||
write:something: Write all the data
|
write:something: Write all the data
|
||||||
OAuth2-Implicit:
|
OAuth2-Implicit:
|
||||||
type: oauth2
|
type: oauth2
|
||||||
scheme: bearer
|
|
||||||
flows:
|
flows:
|
||||||
implicit:
|
implicit:
|
||||||
authorizationUrl: https://api.server.test/v1/auth
|
authorizationUrl: https://api.server.test/v1/auth
|
||||||
@ -58,7 +56,6 @@ components:
|
|||||||
write:something: Write all the data
|
write:something: Write all the data
|
||||||
OAuth2-ClientCredentials:
|
OAuth2-ClientCredentials:
|
||||||
type: oauth2
|
type: oauth2
|
||||||
scheme: bearer
|
|
||||||
flows:
|
flows:
|
||||||
clientCredentials:
|
clientCredentials:
|
||||||
tokenUrl: https://api.server.test/v1/token
|
tokenUrl: https://api.server.test/v1/token
|
||||||
@ -67,7 +64,6 @@ components:
|
|||||||
write:something: Write all the data
|
write:something: Write all the data
|
||||||
OAuth2-Password:
|
OAuth2-Password:
|
||||||
type: oauth2
|
type: oauth2
|
||||||
scheme: bearer
|
|
||||||
flows:
|
flows:
|
||||||
password:
|
password:
|
||||||
tokenUrl: https://api.server.test/v1/token
|
tokenUrl: https://api.server.test/v1/token
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
"httpUsername": "username",
|
"httpUsername": "username",
|
||||||
"oauth2ClientId": "clientId",
|
"oauth2ClientId": "clientId",
|
||||||
"oauth2ClientSecret": "clientSecret",
|
"oauth2ClientSecret": "clientSecret",
|
||||||
|
"oauth2RedirectUrl": "http://localhost/",
|
||||||
"oauth2Username": "username",
|
"oauth2Username": "username",
|
||||||
"oauth2Password": "password",
|
"oauth2Password": "password",
|
||||||
"key": "key",
|
"key": "key",
|
||||||
@ -174,6 +175,7 @@
|
|||||||
"authentication": {
|
"authentication": {
|
||||||
"clientId": "{{ oauth2ClientId }}",
|
"clientId": "{{ oauth2ClientId }}",
|
||||||
"clientSecret": "{{ oauth2ClientSecret }}",
|
"clientSecret": "{{ oauth2ClientSecret }}",
|
||||||
|
"redirectUrl": "{{ oauth2RedirectUrl }}",
|
||||||
"accessTokenUrl": "https://api.server.test/v1/token",
|
"accessTokenUrl": "https://api.server.test/v1/token",
|
||||||
"authorizationUrl": "https://api.server.test/v1/auth",
|
"authorizationUrl": "https://api.server.test/v1/auth",
|
||||||
"grantType": "authorization_code",
|
"grantType": "authorization_code",
|
||||||
@ -193,6 +195,7 @@
|
|||||||
"_type": "request",
|
"_type": "request",
|
||||||
"authentication": {
|
"authentication": {
|
||||||
"clientId": "{{ oauth2ClientId }}",
|
"clientId": "{{ oauth2ClientId }}",
|
||||||
|
"redirectUrl": "{{ oauth2RedirectUrl }}",
|
||||||
"authorizationUrl": "https://api.server.test/v1/auth",
|
"authorizationUrl": "https://api.server.test/v1/auth",
|
||||||
"grantType": "implicit",
|
"grantType": "implicit",
|
||||||
"scope": "read:something write:something",
|
"scope": "read:something write:something",
|
||||||
|
@ -0,0 +1,27 @@
|
|||||||
|
openapi: '3.0.2'
|
||||||
|
info:
|
||||||
|
title: Endpoint Security
|
||||||
|
version: '1.2'
|
||||||
|
servers:
|
||||||
|
- url: https://api.server.test/v1
|
||||||
|
|
||||||
|
components:
|
||||||
|
securitySchemes:
|
||||||
|
OAuth2-AuthorizationCode:
|
||||||
|
type: oauth2
|
||||||
|
flows:
|
||||||
|
authorizationCode:
|
||||||
|
authorizationUrl: https://api.server.test/v1/auth
|
||||||
|
tokenUrl: https://api.server.test/v1/token
|
||||||
|
scopes:
|
||||||
|
read:something: Read all the data
|
||||||
|
write:something: Write all the data
|
||||||
|
|
||||||
|
paths:
|
||||||
|
/oauth2/authorization-code:
|
||||||
|
get:
|
||||||
|
security:
|
||||||
|
- OAuth2-AuthorizationCode: []
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
@ -0,0 +1,59 @@
|
|||||||
|
{
|
||||||
|
"__export_date": "2020-05-13T23:55:24.712Z",
|
||||||
|
"__export_format": 4,
|
||||||
|
"__export_source": "insomnia.importers:v0.1.0",
|
||||||
|
"_type": "export",
|
||||||
|
"resources": [
|
||||||
|
{
|
||||||
|
"_id": "__WORKSPACE_ID__",
|
||||||
|
"_type": "workspace",
|
||||||
|
"description": "",
|
||||||
|
"name": "Endpoint Security 1.2",
|
||||||
|
"parentId": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_id": "__BASE_ENVIRONMENT_ID__",
|
||||||
|
"_type": "environment",
|
||||||
|
"data": {
|
||||||
|
"base_url": "{{ scheme }}://{{ host }}{{ base_path }}"
|
||||||
|
},
|
||||||
|
"name": "Base environment",
|
||||||
|
"parentId": "__WORKSPACE_ID__"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_id": "env___BASE_ENVIRONMENT_ID___sub",
|
||||||
|
"_type": "environment",
|
||||||
|
"data": {
|
||||||
|
"base_path": "/v1",
|
||||||
|
"host": "api.server.test",
|
||||||
|
"oauth2ClientId": "clientId",
|
||||||
|
"oauth2ClientSecret": "clientSecret",
|
||||||
|
"oauth2RedirectUrl": "http://localhost/",
|
||||||
|
"scheme": "https"
|
||||||
|
},
|
||||||
|
"name": "OpenAPI env",
|
||||||
|
"parentId": "__BASE_ENVIRONMENT_ID__"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"_id": "req___WORKSPACE_ID__028b5fb7",
|
||||||
|
"_type": "request",
|
||||||
|
"authentication": {
|
||||||
|
"clientId": "{{ oauth2ClientId }}",
|
||||||
|
"clientSecret": "{{ oauth2ClientSecret }}",
|
||||||
|
"accessTokenUrl": "https://api.server.test/v1/token",
|
||||||
|
"authorizationUrl": "https://api.server.test/v1/auth",
|
||||||
|
"grantType": "authorization_code",
|
||||||
|
"redirectUrl": "{{ oauth2RedirectUrl }}",
|
||||||
|
"scope": "read:something write:something",
|
||||||
|
"type": "oauth2"
|
||||||
|
},
|
||||||
|
"body": {},
|
||||||
|
"headers": [],
|
||||||
|
"method": "GET",
|
||||||
|
"name": "/oauth2/authorization-code",
|
||||||
|
"parameters": [],
|
||||||
|
"parentId": "__WORKSPACE_ID__",
|
||||||
|
"url": "{{ base_url }}/oauth2/authorization-code"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -27,6 +27,8 @@
|
|||||||
"apiKey": "apiKey",
|
"apiKey": "apiKey",
|
||||||
"base_path": "/v2",
|
"base_path": "/v2",
|
||||||
"host": "petstore.swagger.io",
|
"host": "petstore.swagger.io",
|
||||||
|
"oauth2ClientId": "clientId",
|
||||||
|
"oauth2RedirectUrl": "http://localhost/",
|
||||||
"scheme": "http"
|
"scheme": "http"
|
||||||
},
|
},
|
||||||
"name": "OpenAPI env",
|
"name": "OpenAPI env",
|
||||||
@ -35,7 +37,14 @@
|
|||||||
{
|
{
|
||||||
"_id": "req___WORKSPACE_ID__23acbe44",
|
"_id": "req___WORKSPACE_ID__23acbe44",
|
||||||
"_type": "request",
|
"_type": "request",
|
||||||
"authentication": {},
|
"authentication": {
|
||||||
|
"authorizationUrl": "http://petstore.swagger.io/oauth/dialog",
|
||||||
|
"clientId": "{{ oauth2ClientId }}",
|
||||||
|
"grantType": "implicit",
|
||||||
|
"redirectUrl": "{{ oauth2RedirectUrl }}",
|
||||||
|
"scope": "write:pets read:pets",
|
||||||
|
"type": "oauth2"
|
||||||
|
},
|
||||||
"body": {
|
"body": {
|
||||||
"mimeType": "application/json",
|
"mimeType": "application/json",
|
||||||
"text": "{\n \"id\": 0,\n \"category\": {\n \"id\": 0,\n \"name\": \"string\"\n },\n \"name\": \"doggie\",\n \"photoUrls\": [\n \"string\"\n ],\n \"tags\": [\n {\n \"id\": 0,\n \"name\": \"string\"\n }\n ],\n \"status\": \"string\"\n}"
|
"text": "{\n \"id\": 0,\n \"category\": {\n \"id\": 0,\n \"name\": \"string\"\n },\n \"name\": \"doggie\",\n \"photoUrls\": [\n \"string\"\n ],\n \"tags\": [\n {\n \"id\": 0,\n \"name\": \"string\"\n }\n ],\n \"status\": \"string\"\n}"
|
||||||
@ -50,7 +59,14 @@
|
|||||||
{
|
{
|
||||||
"_id": "req___WORKSPACE_ID__74a7a059",
|
"_id": "req___WORKSPACE_ID__74a7a059",
|
||||||
"_type": "request",
|
"_type": "request",
|
||||||
"authentication": {},
|
"authentication": {
|
||||||
|
"authorizationUrl": "http://petstore.swagger.io/oauth/dialog",
|
||||||
|
"clientId": "{{ oauth2ClientId }}",
|
||||||
|
"grantType": "implicit",
|
||||||
|
"redirectUrl": "{{ oauth2RedirectUrl }}",
|
||||||
|
"scope": "write:pets read:pets",
|
||||||
|
"type": "oauth2"
|
||||||
|
},
|
||||||
"body": {
|
"body": {
|
||||||
"mimeType": "application/json",
|
"mimeType": "application/json",
|
||||||
"text": "{\n \"id\": 0,\n \"category\": {\n \"id\": 0,\n \"name\": \"string\"\n },\n \"name\": \"doggie\",\n \"photoUrls\": [\n \"string\"\n ],\n \"tags\": [\n {\n \"id\": 0,\n \"name\": \"string\"\n }\n ],\n \"status\": \"string\"\n}"
|
"text": "{\n \"id\": 0,\n \"category\": {\n \"id\": 0,\n \"name\": \"string\"\n },\n \"name\": \"doggie\",\n \"photoUrls\": [\n \"string\"\n ],\n \"tags\": [\n {\n \"id\": 0,\n \"name\": \"string\"\n }\n ],\n \"status\": \"string\"\n}"
|
||||||
@ -65,7 +81,14 @@
|
|||||||
{
|
{
|
||||||
"_id": "req___WORKSPACE_ID__80ab0d08",
|
"_id": "req___WORKSPACE_ID__80ab0d08",
|
||||||
"_type": "request",
|
"_type": "request",
|
||||||
"authentication": {},
|
"authentication": {
|
||||||
|
"authorizationUrl": "http://petstore.swagger.io/oauth/dialog",
|
||||||
|
"clientId": "{{ oauth2ClientId }}",
|
||||||
|
"grantType": "implicit",
|
||||||
|
"redirectUrl": "{{ oauth2RedirectUrl }}",
|
||||||
|
"scope": "write:pets read:pets",
|
||||||
|
"type": "oauth2"
|
||||||
|
},
|
||||||
"body": {},
|
"body": {},
|
||||||
"headers": [],
|
"headers": [],
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
@ -83,7 +106,14 @@
|
|||||||
{
|
{
|
||||||
"_id": "req___WORKSPACE_ID__42a17980",
|
"_id": "req___WORKSPACE_ID__42a17980",
|
||||||
"_type": "request",
|
"_type": "request",
|
||||||
"authentication": {},
|
"authentication": {
|
||||||
|
"authorizationUrl": "http://petstore.swagger.io/oauth/dialog",
|
||||||
|
"clientId": "{{ oauth2ClientId }}",
|
||||||
|
"grantType": "implicit",
|
||||||
|
"redirectUrl": "{{ oauth2RedirectUrl }}",
|
||||||
|
"scope": "write:pets read:pets",
|
||||||
|
"type": "oauth2"
|
||||||
|
},
|
||||||
"body": {},
|
"body": {},
|
||||||
"headers": [],
|
"headers": [],
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
@ -119,7 +149,14 @@
|
|||||||
{
|
{
|
||||||
"_id": "req___WORKSPACE_ID__a4608701",
|
"_id": "req___WORKSPACE_ID__a4608701",
|
||||||
"_type": "request",
|
"_type": "request",
|
||||||
"authentication": {},
|
"authentication": {
|
||||||
|
"authorizationUrl": "http://petstore.swagger.io/oauth/dialog",
|
||||||
|
"clientId": "{{ oauth2ClientId }}",
|
||||||
|
"grantType": "implicit",
|
||||||
|
"redirectUrl": "{{ oauth2RedirectUrl }}",
|
||||||
|
"scope": "write:pets read:pets",
|
||||||
|
"type": "oauth2"
|
||||||
|
},
|
||||||
"body": {
|
"body": {
|
||||||
"mimeType": "application/x-www-form-urlencoded"
|
"mimeType": "application/x-www-form-urlencoded"
|
||||||
},
|
},
|
||||||
@ -133,7 +170,14 @@
|
|||||||
{
|
{
|
||||||
"_id": "req___WORKSPACE_ID__e804bd05",
|
"_id": "req___WORKSPACE_ID__e804bd05",
|
||||||
"_type": "request",
|
"_type": "request",
|
||||||
"authentication": {},
|
"authentication": {
|
||||||
|
"authorizationUrl": "http://petstore.swagger.io/oauth/dialog",
|
||||||
|
"clientId": "{{ oauth2ClientId }}",
|
||||||
|
"grantType": "implicit",
|
||||||
|
"redirectUrl": "{{ oauth2RedirectUrl }}",
|
||||||
|
"scope": "write:pets read:pets",
|
||||||
|
"type": "oauth2"
|
||||||
|
},
|
||||||
"body": {},
|
"body": {},
|
||||||
"headers": [
|
"headers": [
|
||||||
{
|
{
|
||||||
@ -151,7 +195,14 @@
|
|||||||
{
|
{
|
||||||
"_id": "req___WORKSPACE_ID__8081fb6f",
|
"_id": "req___WORKSPACE_ID__8081fb6f",
|
||||||
"_type": "request",
|
"_type": "request",
|
||||||
"authentication": {},
|
"authentication": {
|
||||||
|
"authorizationUrl": "http://petstore.swagger.io/oauth/dialog",
|
||||||
|
"clientId": "{{ oauth2ClientId }}",
|
||||||
|
"grantType": "implicit",
|
||||||
|
"redirectUrl": "{{ oauth2RedirectUrl }}",
|
||||||
|
"scope": "write:pets read:pets",
|
||||||
|
"type": "oauth2"
|
||||||
|
},
|
||||||
"body": {
|
"body": {
|
||||||
"mimeType": "multipart/form-data"
|
"mimeType": "multipart/form-data"
|
||||||
},
|
},
|
||||||
|
@ -27,6 +27,8 @@
|
|||||||
"apiKey": "apiKey",
|
"apiKey": "apiKey",
|
||||||
"base_path": "/v2",
|
"base_path": "/v2",
|
||||||
"host": "petstore.swagger.io",
|
"host": "petstore.swagger.io",
|
||||||
|
"oauth2ClientId": "clientId",
|
||||||
|
"oauth2RedirectUrl": "http://localhost/",
|
||||||
"scheme": "http"
|
"scheme": "http"
|
||||||
},
|
},
|
||||||
"name": "OpenAPI env",
|
"name": "OpenAPI env",
|
||||||
@ -59,7 +61,14 @@
|
|||||||
{
|
{
|
||||||
"_id": "req___WORKSPACE_ID__23acbe44",
|
"_id": "req___WORKSPACE_ID__23acbe44",
|
||||||
"_type": "request",
|
"_type": "request",
|
||||||
"authentication": {},
|
"authentication": {
|
||||||
|
"authorizationUrl": "http://petstore.swagger.io/oauth/dialog",
|
||||||
|
"clientId": "{{ oauth2ClientId }}",
|
||||||
|
"grantType": "implicit",
|
||||||
|
"redirectUrl": "{{ oauth2RedirectUrl }}",
|
||||||
|
"scope": "write:pets read:pets",
|
||||||
|
"type": "oauth2"
|
||||||
|
},
|
||||||
"body": {
|
"body": {
|
||||||
"mimeType": "application/json",
|
"mimeType": "application/json",
|
||||||
"text": "{\n \"id\": 0,\n \"category\": {\n \"id\": 0,\n \"name\": \"string\"\n },\n \"name\": \"doggie\",\n \"photoUrls\": [\n \"string\"\n ],\n \"tags\": [\n {\n \"id\": 0,\n \"name\": \"string\"\n }\n ],\n \"status\": \"string\"\n}"
|
"text": "{\n \"id\": 0,\n \"category\": {\n \"id\": 0,\n \"name\": \"string\"\n },\n \"name\": \"doggie\",\n \"photoUrls\": [\n \"string\"\n ],\n \"tags\": [\n {\n \"id\": 0,\n \"name\": \"string\"\n }\n ],\n \"status\": \"string\"\n}"
|
||||||
@ -74,7 +83,14 @@
|
|||||||
{
|
{
|
||||||
"_id": "req___WORKSPACE_ID__74a7a059",
|
"_id": "req___WORKSPACE_ID__74a7a059",
|
||||||
"_type": "request",
|
"_type": "request",
|
||||||
"authentication": {},
|
"authentication": {
|
||||||
|
"authorizationUrl": "http://petstore.swagger.io/oauth/dialog",
|
||||||
|
"clientId": "{{ oauth2ClientId }}",
|
||||||
|
"grantType": "implicit",
|
||||||
|
"redirectUrl": "{{ oauth2RedirectUrl }}",
|
||||||
|
"scope": "write:pets read:pets",
|
||||||
|
"type": "oauth2"
|
||||||
|
},
|
||||||
"body": {
|
"body": {
|
||||||
"mimeType": "application/json",
|
"mimeType": "application/json",
|
||||||
"text": "{\n \"id\": 0,\n \"category\": {\n \"id\": 0,\n \"name\": \"string\"\n },\n \"name\": \"doggie\",\n \"photoUrls\": [\n \"string\"\n ],\n \"tags\": [\n {\n \"id\": 0,\n \"name\": \"string\"\n }\n ],\n \"status\": \"string\"\n}"
|
"text": "{\n \"id\": 0,\n \"category\": {\n \"id\": 0,\n \"name\": \"string\"\n },\n \"name\": \"doggie\",\n \"photoUrls\": [\n \"string\"\n ],\n \"tags\": [\n {\n \"id\": 0,\n \"name\": \"string\"\n }\n ],\n \"status\": \"string\"\n}"
|
||||||
@ -89,7 +105,14 @@
|
|||||||
{
|
{
|
||||||
"_id": "req___WORKSPACE_ID__80ab0d08",
|
"_id": "req___WORKSPACE_ID__80ab0d08",
|
||||||
"_type": "request",
|
"_type": "request",
|
||||||
"authentication": {},
|
"authentication": {
|
||||||
|
"authorizationUrl": "http://petstore.swagger.io/oauth/dialog",
|
||||||
|
"clientId": "{{ oauth2ClientId }}",
|
||||||
|
"grantType": "implicit",
|
||||||
|
"redirectUrl": "{{ oauth2RedirectUrl }}",
|
||||||
|
"scope": "write:pets read:pets",
|
||||||
|
"type": "oauth2"
|
||||||
|
},
|
||||||
"body": {},
|
"body": {},
|
||||||
"headers": [],
|
"headers": [],
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
@ -107,7 +130,14 @@
|
|||||||
{
|
{
|
||||||
"_id": "req___WORKSPACE_ID__42a17980",
|
"_id": "req___WORKSPACE_ID__42a17980",
|
||||||
"_type": "request",
|
"_type": "request",
|
||||||
"authentication": {},
|
"authentication": {
|
||||||
|
"authorizationUrl": "http://petstore.swagger.io/oauth/dialog",
|
||||||
|
"clientId": "{{ oauth2ClientId }}",
|
||||||
|
"grantType": "implicit",
|
||||||
|
"redirectUrl": "{{ oauth2RedirectUrl }}",
|
||||||
|
"scope": "write:pets read:pets",
|
||||||
|
"type": "oauth2"
|
||||||
|
},
|
||||||
"body": {},
|
"body": {},
|
||||||
"headers": [],
|
"headers": [],
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
@ -143,7 +173,14 @@
|
|||||||
{
|
{
|
||||||
"_id": "req___WORKSPACE_ID__a4608701",
|
"_id": "req___WORKSPACE_ID__a4608701",
|
||||||
"_type": "request",
|
"_type": "request",
|
||||||
"authentication": {},
|
"authentication": {
|
||||||
|
"authorizationUrl": "http://petstore.swagger.io/oauth/dialog",
|
||||||
|
"clientId": "{{ oauth2ClientId }}",
|
||||||
|
"grantType": "implicit",
|
||||||
|
"redirectUrl": "{{ oauth2RedirectUrl }}",
|
||||||
|
"scope": "write:pets read:pets",
|
||||||
|
"type": "oauth2"
|
||||||
|
},
|
||||||
"body": {
|
"body": {
|
||||||
"mimeType": "application/x-www-form-urlencoded"
|
"mimeType": "application/x-www-form-urlencoded"
|
||||||
},
|
},
|
||||||
@ -157,7 +194,14 @@
|
|||||||
{
|
{
|
||||||
"_id": "req___WORKSPACE_ID__e804bd05",
|
"_id": "req___WORKSPACE_ID__e804bd05",
|
||||||
"_type": "request",
|
"_type": "request",
|
||||||
"authentication": {},
|
"authentication": {
|
||||||
|
"authorizationUrl": "http://petstore.swagger.io/oauth/dialog",
|
||||||
|
"clientId": "{{ oauth2ClientId }}",
|
||||||
|
"grantType": "implicit",
|
||||||
|
"redirectUrl": "{{ oauth2RedirectUrl }}",
|
||||||
|
"scope": "write:pets read:pets",
|
||||||
|
"type": "oauth2"
|
||||||
|
},
|
||||||
"body": {},
|
"body": {},
|
||||||
"headers": [
|
"headers": [
|
||||||
{
|
{
|
||||||
@ -175,7 +219,14 @@
|
|||||||
{
|
{
|
||||||
"_id": "req___WORKSPACE_ID__8081fb6f",
|
"_id": "req___WORKSPACE_ID__8081fb6f",
|
||||||
"_type": "request",
|
"_type": "request",
|
||||||
"authentication": {},
|
"authentication": {
|
||||||
|
"authorizationUrl": "http://petstore.swagger.io/oauth/dialog",
|
||||||
|
"clientId": "{{ oauth2ClientId }}",
|
||||||
|
"grantType": "implicit",
|
||||||
|
"redirectUrl": "{{ oauth2RedirectUrl }}",
|
||||||
|
"scope": "write:pets read:pets",
|
||||||
|
"type": "oauth2"
|
||||||
|
},
|
||||||
"body": {
|
"body": {
|
||||||
"mimeType": "multipart/form-data"
|
"mimeType": "multipart/form-data"
|
||||||
},
|
},
|
||||||
|
@ -339,7 +339,7 @@ const parseSecurity = (
|
|||||||
const authScheme = supportedSchemes.find(
|
const authScheme = supportedSchemes.find(
|
||||||
scheme =>
|
scheme =>
|
||||||
[SECURITY_TYPE.HTTP, SECURITY_TYPE.OAUTH].includes(scheme.type) &&
|
[SECURITY_TYPE.HTTP, SECURITY_TYPE.OAUTH].includes(scheme.type) &&
|
||||||
SUPPORTED_HTTP_AUTH_SCHEMES.includes(scheme.scheme),
|
(scheme.type === SECURITY_TYPE.OAUTH || SUPPORTED_HTTP_AUTH_SCHEMES.includes(scheme.scheme)),
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!authScheme) {
|
if (!authScheme) {
|
||||||
@ -402,10 +402,17 @@ const getSecurityEnvVariables = (securitySchemeObject?: OpenAPIV3.SecurityScheme
|
|||||||
}
|
}
|
||||||
|
|
||||||
const oauth2Variables = securitySchemes.reduce((accumulator, scheme) => {
|
const oauth2Variables = securitySchemes.reduce((accumulator, scheme) => {
|
||||||
if (scheme.type === SECURITY_TYPE.OAUTH && scheme.scheme === 'bearer') {
|
if (scheme.type === SECURITY_TYPE.OAUTH) {
|
||||||
accumulator.oauth2ClientId = 'clientId';
|
accumulator.oauth2ClientId = 'clientId';
|
||||||
const flows = scheme.flows || {};
|
const flows = scheme.flows || {};
|
||||||
|
|
||||||
|
if (
|
||||||
|
flows.authorizationCode ||
|
||||||
|
flows.implicit
|
||||||
|
) {
|
||||||
|
accumulator.oauth2RedirectUrl = 'http://localhost/';
|
||||||
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
flows.authorizationCode ||
|
flows.authorizationCode ||
|
||||||
flows.clientCredentials ||
|
flows.clientCredentials ||
|
||||||
@ -657,6 +664,7 @@ const parseOAuth2 = (scheme: OpenAPIV3.OAuth2SecurityScheme) => {
|
|||||||
return {
|
return {
|
||||||
...base,
|
...base,
|
||||||
clientSecret: '{{ oauth2ClientSecret }}',
|
clientSecret: '{{ oauth2ClientSecret }}',
|
||||||
|
redirectUrl: '{{ oauth2RedirectUrl }}',
|
||||||
accessTokenUrl: (flow as OpenAPIV3.OAuth2SecurityScheme['flows'][typeof OAUTH_FLOWS.AUTHORIZATION_CODE])?.tokenUrl,
|
accessTokenUrl: (flow as OpenAPIV3.OAuth2SecurityScheme['flows'][typeof OAUTH_FLOWS.AUTHORIZATION_CODE])?.tokenUrl,
|
||||||
authorizationUrl: (flow as OpenAPIV3.OAuth2SecurityScheme['flows'][typeof OAUTH_FLOWS.AUTHORIZATION_CODE])?.authorizationUrl,
|
authorizationUrl: (flow as OpenAPIV3.OAuth2SecurityScheme['flows'][typeof OAUTH_FLOWS.AUTHORIZATION_CODE])?.authorizationUrl,
|
||||||
};
|
};
|
||||||
@ -671,6 +679,7 @@ const parseOAuth2 = (scheme: OpenAPIV3.OAuth2SecurityScheme) => {
|
|||||||
case OAUTH_FLOWS.IMPLICIT:
|
case OAUTH_FLOWS.IMPLICIT:
|
||||||
return {
|
return {
|
||||||
...base,
|
...base,
|
||||||
|
redirectUrl: '{{ oauth2RedirectUrl }}',
|
||||||
authorizationUrl: (flow as OpenAPIV3.OAuth2SecurityScheme['flows'][typeof OAUTH_FLOWS.IMPLICIT])?.authorizationUrl,
|
authorizationUrl: (flow as OpenAPIV3.OAuth2SecurityScheme['flows'][typeof OAUTH_FLOWS.IMPLICIT])?.authorizationUrl,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user