{ "info": { "_postman_id": "036cc5bb-2b0a-4573-a45e-cf27125db7be", "name": "LaravelRestApiWithPassport", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" }, "item": [ { "name": "Auth", "item": [ { "name": "Register", "request": { "auth": { "type": "noauth" }, "method": "POST", "header": [], "body": { "mode": "urlencoded", "urlencoded": [ { "key": "email", "value": "user@devpora.com", "type": "text" }, { "key": "password", "value": "12345678", "type": "text" }, { "key": "password_confirmation", "value": "12345678", "type": "text" }, { "key": "name", "value": "user", "type": "text" } ] }, "url": { "raw": "{{url}}/auth/register", "host": [ "{{url}}" ], "path": [ "auth", "register" ] } }, "response": [] }, { "name": "Login", "request": { "method": "POST", "header": [], "body": { "mode": "urlencoded", "urlencoded": [ { "key": "email", "value": "{{login}}", "type": "text" }, { "key": "password", "value": "{{password}}", "type": "text" } ] }, "url": { "raw": "{{url}}/auth/login", "host": [ "{{url}}" ], "path": [ "auth", "login" ] } }, "response": [] }, { "name": "Logout", "request": { "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "{{token}}", "type": "string" } ] }, "method": "POST", "header": [], "body": { "mode": "urlencoded", "urlencoded": [] }, "url": { "raw": "{{url}}/auth/logout", "host": [ "{{url}}" ], "path": [ "auth", "logout" ] } }, "response": [] } ] }, { "name": "oAuth", "item": [ { "name": "Login Google", "request": { "method": "POST", "header": [], "body": { "mode": "urlencoded", "urlencoded": [ { "key": "oAuthCode", "value": "CHANGE", "type": "text" }, { "key": "provider", "value": "google", "type": "text" } ] }, "url": { "raw": "{{url}}/oauth/login", "host": [ "{{url}}" ], "path": [ "oauth", "login" ] } }, "response": [] }, { "name": "Login GitHub", "request": { "method": "POST", "header": [], "body": { "mode": "urlencoded", "urlencoded": [ { "key": "oAuthCode", "value": "CHANGE", "type": "text" }, { "key": "provider", "value": "github", "type": "text" } ] }, "url": { "raw": "{{url}}/oauth/login", "host": [ "{{url}}" ], "path": [ "oauth", "login" ] } }, "response": [] }, { "name": "Login GitLab", "request": { "method": "POST", "header": [], "body": { "mode": "urlencoded", "urlencoded": [ { "key": "oAuthCode", "value": "CHANGE", "type": "text" }, { "key": "provider", "value": "gitlab", "type": "text" } ] }, "url": { "raw": "{{url}}/oauth/login", "host": [ "{{url}}" ], "path": [ "oauth", "login" ] } }, "response": [] } ] }, { "name": "Users", "item": [ { "name": "index", "request": { "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "{{token}}", "type": "string" } ] }, "method": "GET", "header": [], "url": { "raw": "{{url}}/users", "host": [ "{{url}}" ], "path": [ "users" ] } }, "response": [] } ] }, { "name": "TEST - Providers", "item": [ { "name": "GitHub", "item": [ { "name": "Get Access Token", "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/json", "type": "text" } ], "body": { "mode": "urlencoded", "urlencoded": [ { "key": "code", "value": "ADD_CODE_FROM_FRONTEND", "type": "text" }, { "key": "client_id", "value": "{{OAUTH_GITHUB_CLIENT_ID}}", "type": "text" }, { "key": "client_secret", "value": "{{OAUTH_GITHUB_CLIENT_SECRET}}", "type": "text" } ] }, "url": { "raw": "https://github.com/login/oauth/access_token", "protocol": "https", "host": [ "github", "com" ], "path": [ "login", "oauth", "access_token" ] } }, "response": [] }, { "name": "Get User Data", "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "auth": { "type": "noauth" }, "method": "GET", "header": [ { "key": "Accept", "value": "application/json", "type": "text" }, { "key": "Authorization", "value": "Bearer ADD_TOKEN_FROM_PREVIOUS_RESPONSE", "type": "text" } ], "body": { "mode": "urlencoded", "urlencoded": [] }, "url": { "raw": "https://api.github.com/user", "protocol": "https", "host": [ "api", "github", "com" ], "path": [ "user" ] } }, "response": [] }, { "name": "Get User Emails", "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "auth": { "type": "noauth" }, "method": "GET", "header": [ { "key": "Accept", "value": "application/json", "type": "text" }, { "key": "Authorization", "value": "Bearer ADD_TOKEN_FROM_PREVIOUS_RESPONSE", "type": "text" } ], "body": { "mode": "urlencoded", "urlencoded": [] }, "url": { "raw": "https://api.github.com/user/emails", "protocol": "https", "host": [ "api", "github", "com" ], "path": [ "user", "emails" ] } }, "response": [] } ] }, { "name": "GitLab", "item": [ { "name": "Get Access Token", "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/json", "type": "text" } ], "body": { "mode": "urlencoded", "urlencoded": [ { "key": "code", "value": "ADD_CODE_FROM_FRONTEND", "type": "text" }, { "key": "client_id", "value": "{{OAUTH_GITLAB_CLIENT_ID}}", "type": "text" }, { "key": "client_secret", "value": "{{OAUTH_GITLAB_CLIENT_SECRET}}", "type": "text" }, { "key": "grant_type", "value": "authorization_code", "type": "text" }, { "key": "redirect_uri", "value": "{{OAUTH_REDIRECT_URI}}gitlab", "type": "text" }, { "key": "code_verifier", "value": "{{OAUTH_GITLAB_CODE_VERIFIER}}", "type": "text" } ] }, "url": { "raw": "https://gitlab.com/oauth/token", "protocol": "https", "host": [ "gitlab", "com" ], "path": [ "oauth", "token" ] } }, "response": [] }, { "name": "Get User Data", "protocolProfileBehavior": { "disableBodyPruning": true }, "request": { "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "ADD_TOKEN_FROM_PREVIOUS_RESPONSE", "type": "string" } ] }, "method": "GET", "header": [ { "key": "Accept", "value": "application/json", "type": "text" } ], "body": { "mode": "urlencoded", "urlencoded": [] }, "url": { "raw": "https://gitlab.com/api/v4/user", "protocol": "https", "host": [ "gitlab", "com" ], "path": [ "api", "v4", "user" ] } }, "response": [] } ] }, { "name": "Google", "item": [ { "name": "Get Access Token", "request": { "method": "POST", "header": [ { "key": "Accept", "value": "application/json", "type": "text" } ], "body": { "mode": "urlencoded", "urlencoded": [ { "key": "code", "value": "ADD_CODE_FROM_FRONTEND", "type": "text" }, { "key": "client_id", "value": "{{OAUTH_GOOGLE_CLIENT_ID}}", "type": "text" }, { "key": "client_secret", "value": "{{OAUTH_GOOGLE_CLIENT_SECRET}}", "type": "text" }, { "key": "redirect_uri", "value": "{{OAUTH_REDIRECT_URI}}google", "type": "text" }, { "key": "grant_type", "value": "authorization_code", "type": "text" } ] }, "url": { "raw": "https://oauth2.googleapis.com/token", "protocol": "https", "host": [ "oauth2", "googleapis", "com" ], "path": [ "token" ] } }, "response": [] }, { "name": "Get User Data", "request": { "auth": { "type": "noauth" }, "method": "POST", "header": [ { "key": "Accept", "value": "application/json", "type": "text" }, { "key": "Authorization", "value": "Bearer ADD_TOKEN_FROM_PREVIOUS_RESPONSE", "type": "text" } ], "body": { "mode": "urlencoded", "urlencoded": [ { "key": "access_token", "value": "ADD_TOKEN_FROM_PREVIOUS_RESPONSE", "type": "text" } ] }, "url": { "raw": "https://www.googleapis.com/oauth2/v3/tokeninfo", "protocol": "https", "host": [ "www", "googleapis", "com" ], "path": [ "oauth2", "v3", "tokeninfo" ] } }, "response": [] } ] } ] }, { "name": "Today", "request": { "method": "GET", "header": [], "url": { "raw": "{{url}}/today", "host": [ "{{url}}" ], "path": [ "today" ] } }, "response": [] }, { "name": "Today (auth)", "request": { "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "{{token}}", "type": "string" } ] }, "method": "GET", "header": [], "url": { "raw": "{{url}}/today_auth", "host": [ "{{url}}" ], "path": [ "today_auth" ] } }, "response": [] }, { "name": "Me", "request": { "auth": { "type": "bearer", "bearer": [ { "key": "token", "value": "{{token}}", "type": "string" } ] }, "method": "GET", "header": [], "url": { "raw": "{{url}}/me", "host": [ "{{url}}" ], "path": [ "me" ] } }, "response": [] } ] }