{"id":16989523,"url":"https://github.com/jottenlips/vaporauthtemplaterequestexamples","last_synced_at":"2025-03-22T03:10:11.775Z","repository":{"id":101733768,"uuid":"144314919","full_name":"jottenlips/VaporAuthTemplateRequestExamples","owner":"jottenlips","description":"💧 Sample requests and documentation for creating your first authenticated Vapor API 💧","archived":false,"fork":false,"pushed_at":"2019-02-19T22:30:57.000Z","size":34,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-19T05:34:21.630Z","etag":null,"topics":["api","apple","auth","authentication","basic-authentication","bearer-tokens","curl","endpoints","example","paw","postman","protected-routes","server","server-side-swift","swift","users","vapor","vapor2","vapor3","xcode"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jottenlips.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-08-10T17:30:22.000Z","updated_at":"2019-02-19T22:30:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"03a2e4bf-199e-4552-b542-db449938a43f","html_url":"https://github.com/jottenlips/VaporAuthTemplateRequestExamples","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jottenlips%2FVaporAuthTemplateRequestExamples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jottenlips%2FVaporAuthTemplateRequestExamples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jottenlips%2FVaporAuthTemplateRequestExamples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jottenlips%2FVaporAuthTemplateRequestExamples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jottenlips","download_url":"https://codeload.github.com/jottenlips/VaporAuthTemplateRequestExamples/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244898446,"owners_count":20528341,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","apple","auth","authentication","basic-authentication","bearer-tokens","curl","endpoints","example","paw","postman","protected-routes","server","server-side-swift","swift","users","vapor","vapor2","vapor3","xcode"],"created_at":"2024-10-14T03:06:54.589Z","updated_at":"2025-03-22T03:10:11.752Z","avatar_url":"https://github.com/jottenlips.png","language":null,"readme":"# Example requests for Vapor Auth Api template\n## Make a new template\n### Install vapor using brew\n\n`brew install vapor/tap/vapor`\n\n### Make a new vapor authenticated api\n\nhttps://docs.vapor.codes/3.0/auth/getting-started/\n\n```\nvapor new hello --auth\n```\n```\ncd hello\n```\n\nthen\n\n```\nvapor build\n```\n```\nvapor run\n``` \nor\n```\nvapor xcode\n```\n\n## Create user # VAPOR 3\n\n```\ncurl -X \"POST\" \"http://localhost:8080/users\" \\\n     -H 'Content-Type: application/json; charset=utf-8' \\\n     -d $'{\n  \"name\": \"\",\n  \"email\": \"\",\n  \"password\": \"\",\n  \"verifyPassword = \"\"\n}'\n\n```\n\n## Login\n\n```\ncurl -X \"POST\" \"http://localhost:8080/login\" \\\n     -H 'Content-Type: application/json; charset=utf-8' \\\n     -u 'myemail:mypassord' \\\n     -d $'{}'\n```\n\nreturns `token` to be used for protected routes.\n\n## Todo object\n\n### get todo\n\n```\ncurl \"http://localhost:8080/todos?\" \\\n     -H 'Authorization: Bearer mytokenhere' \\\n     -H 'Content-Type: application/json; charset=utf-8' \\\n     -d $'{}'\n```\n\n### post todo\n\n```\ncurl -X \"POST\" \"http://localhost:8080/todos\" \\\n     -H 'Authorization: Bearer 0BMDp6YeOuH0qYYrXInDhA==' \\\n     -H 'Content-Type: application/json; charset=utf-8' \\\n     -d $'{\n  \"title\": \"Do the dishes\"\n}'\n```\n### delete todo\n```\ncurl -X \"DELETE\" \"http://localhost:8080/todos/1\" \\\n     -H 'Authorization: Bearer 0BMDp6YeOuH0qYYrXInDhA==' \\\n     -H 'Content-Type: application/json; charset=utf-8' \\\n     -d $'{}'\n```\n\n## Create user # VAPOR 2\n\n### register\n\n```\n## i-register\ncurl -X \"POST\" \"http://localhost:8080/users\" \\\n     -H 'Content-Type: application/json; charset=utf-8' \\\n     -d $'{\n  \"name\": \"\",\n  \"email\": \"\",\n  \"password\": \"\"\n}'\n\n```\n\n## Login\n\n### login\n\n```\ncurl -X \"POST\" \"http://localhost:8080/login\" \\\n     -H 'Content-Type: application/json; charset=utf-8' \\\n     -u 'myemail:mypassord' \\\n     -d $'{}'\n```\n\nreturns `token` to be used for protected routes.\n\n## Get protected data\n\n### me\n\n```\ncurl \"http://localhost:8080/me?\" \\\n     -H 'Authorization: Bearer mytokenhere' \\\n     -H 'Content-Type: application/json; charset=utf-8' \\\n     -d $'{}'\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjottenlips%2Fvaporauthtemplaterequestexamples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjottenlips%2Fvaporauthtemplaterequestexamples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjottenlips%2Fvaporauthtemplaterequestexamples/lists"}