batazor/go-auth

View on GitHub
docs/go-auth.postman_collection.json

Summary

Maintainability
Test Coverage
{
    "variables": [],
    "info": {
        "name": "go-auth",
        "_postman_id": "bd6518ef-40a4-4283-e15c-aeaf3f60c6cb",
        "description": "",
        "schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json"
    },
    "item": [
        {
            "name": "auth",
            "description": "",
            "item": [
                {
                    "name": "Login",
                    "event": [
                        {
                            "listen": "test",
                            "script": {
                                "type": "text/javascript",
                                "exec": [
                                    "const jsonData = JSON.parse(responseBody);",
                                    "postman.setEnvironmentVariable(\"TOKEN_ACCESS\", jsonData.tokens.access);",
                                    "postman.setEnvironmentVariable(\"TOKEN_REFRESH\", jsonData.tokens.refresh);"
                                ]
                            }
                        }
                    ],
                    "request": {
                        "url": "{{URL_API}}/auth",
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json",
                                "description": ""
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"mail\": \"admin@example.com\",\n    \"password\": \"admin\"\n}"
                        },
                        "description": null
                    },
                    "response": []
                },
                {
                    "name": "Registration",
                    "request": {
                        "url": "{{URL_API}}/auth/new",
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"mail\": \"worker@example.com\",\n    \"password\": \"worker\"\n}"
                        },
                        "description": null
                    },
                    "response": []
                },
                {
                    "name": "Recovery account",
                    "request": {
                        "url": "{{URL_API}}/auth/recovery",
                        "method": "POST",
                        "header": [],
                        "body": {},
                        "description": null
                    },
                    "response": []
                },
                {
                    "name": "Refresh token",
                    "request": {
                        "url": "{{URL_API}}/auth/refresh",
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json",
                                "description": ""
                            },
                            {
                                "key": "Authorization",
                                "value": "{{TOKEN_REFRESH}}",
                                "description": ""
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"mail\": \"admin@example.com\",\n    \"password\": \"admin\"\n}"
                        },
                        "description": null
                    },
                    "response": []
                },
                {
                    "name": "OAuth google",
                    "request": {
                        "url": "{{URL_API}}/oauth/google",
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json",
                                "description": ""
                            }
                        ],
                        "body": {},
                        "description": ""
                    },
                    "response": []
                }
            ]
        },
        {
            "name": "users",
            "description": "",
            "item": [
                {
                    "name": "Get users list",
                    "request": {
                        "url": "{{URL_API}}/users",
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            },
                            {
                                "key": "Authorization",
                                "value": "{{TOKEN_ACCESS}}"
                            }
                        ],
                        "body": {},
                        "description": null
                    },
                    "response": []
                },
                {
                    "name": "Add user",
                    "request": {
                        "url": "{{URL_API}}/users",
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            },
                            {
                                "key": "Authorization",
                                "value": "{{TOKEN_ACCESS}}"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\n  \"mail\": \"admin1@gmail.com\",\n  \"password\": \"admin\"\n}"
                        },
                        "description": null
                    },
                    "response": []
                },
                {
                    "name": "Update user",
                    "request": {
                        "url": "{{URL_API}}/users/{{USER_ID}}",
                        "method": "PATCH",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            },
                            {
                                "key": "Authorization",
                                "value": "{{TOKEN_ACCESS}}"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"id\": \"{{USER_ID}}\",\n    \"mail\": \"ivan54@gmail.com\",\n    \"password\": \"1234567\",\n    \"created_on\": 0,\n    \"updated_on\": 0\n}"
                        },
                        "description": null
                    },
                    "response": []
                },
                {
                    "name": "Delete user",
                    "request": {
                        "url": "{{URL_API}}/users/{{USER_ID}}",
                        "method": "DELETE",
                        "header": [
                            {
                                "key": "Authorization",
                                "value": "{{TOKEN_ACCESS}}"
                            }
                        ],
                        "body": {},
                        "description": null
                    },
                    "response": []
                }
            ]
        }
    ]
}