diff --git a/Itential/Platform/OpenAPISpecs/OpenApiWhoamI-BasicAuth.json b/Itential/Platform/OpenAPISpecs/OpenApiWhoamI-BasicAuth.json new file mode 100644 index 0000000..9640983 --- /dev/null +++ b/Itential/Platform/OpenAPISpecs/OpenApiWhoamI-BasicAuth.json @@ -0,0 +1,60 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "IAP", + "version": "1.0.0", + "description": "A simple OpenAPI example" + }, + "paths": { + "/whoami": { + "get": { + "summary": "Gets the authorization data for the logged in user", + "description": "Gets the authorization data for the logged in user", + "tags": ["authentication"], + "operationId": "WhoAmI", + "responses": { + "200": { + "description": "Authorization data for a user", + "content": { + "application/json": { + "schema": { + "title": "result", + "type": "object", + "properties": {} + } + } + } + }, + "500": { + "description": "Error response from API" + } + }, + "security": [ + { + "QueryAuth": [], + "CookieAuth": [], + "BasicAuth": [] + } + ] + } + } + }, + "components": { + "securitySchemes":{ + "CookieAuth": { + "type": "apiKey", + "name": "token", + "in": "cookie" + }, + "QueryAuth": { + "type": "apiKey", + "name": "token", + "in": "query" + }, + "BasicAuth": { + "type": "http", + "scheme": "basic" + } + } + } +} \ No newline at end of file diff --git a/Itential/Platform/OpenAPISpecs/OpenApiWhoamI-ClientCreds.json b/Itential/Platform/OpenAPISpecs/OpenApiWhoamI-ClientCreds.json new file mode 100644 index 0000000..36ef164 --- /dev/null +++ b/Itential/Platform/OpenAPISpecs/OpenApiWhoamI-ClientCreds.json @@ -0,0 +1,53 @@ +{ + "openapi": "3.1.0", + "info": { + "title": "IAP", + "version": "1.0.0", + "description": "A simple OpenAPI example" + }, + "paths": { + "/whoami": { + "get": { + "summary": "Gets the authorization data for the logged in user", + "description": "Gets the authorization data for the logged in user", + "tags": ["authentication"], + "operationId": "WhoAmI", + "responses": { + "200": { + "description": "Authorization data for a user", + "content": { + "application/json": { + "schema": { + "title": "result", + "type": "object", + "properties": {} + } + } + } + }, + "500": { + "description": "Error response from API" + } + }, + "security": [ + { + "ServiceAccount": [] + } + ] + } + } + }, + "components": { + "securitySchemes": { + "ServiceAccount": { + "type": "oauth2", + "flows": { + "clientCredentials": { + "tokenUrl": "https://platform/oauth/token", + "scopes": {} + } + } + } + } + } +} \ No newline at end of file