{"id":17948815,"url":"https://github.com/camirmas/bartender","last_synced_at":"2025-03-24T22:35:36.011Z","repository":{"id":57479351,"uuid":"131567827","full_name":"camirmas/bartender","owner":"camirmas","description":":cocktail: JWT authentication using Absinthe + Guardian","archived":false,"fork":false,"pushed_at":"2018-04-30T08:25:36.000Z","size":10,"stargazers_count":12,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-16T19:37:50.544Z","etag":null,"topics":["authentication","elixir","graphql","phoenix-framework"],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/camirmas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-30T07:33:55.000Z","updated_at":"2023-09-01T10:47:20.000Z","dependencies_parsed_at":"2022-09-17T04:51:44.503Z","dependency_job_id":null,"html_url":"https://github.com/camirmas/bartender","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/camirmas%2Fbartender","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/camirmas%2Fbartender/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/camirmas%2Fbartender/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/camirmas%2Fbartender/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/camirmas","download_url":"https://codeload.github.com/camirmas/bartender/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245366205,"owners_count":20603438,"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":["authentication","elixir","graphql","phoenix-framework"],"created_at":"2024-10-29T09:10:03.456Z","updated_at":"2025-03-24T22:35:30.990Z","avatar_url":"https://github.com/camirmas.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# :cocktail: Bartender\n\n\u003e JWT authentication using [Absinthe](https://github.com/absinthe-graphql/absinthe) + [Guardian](https://github.com/ueberauth/guardian)\n\n## Installation\n\nIf [available in Hex](https://hex.pm/docs/publish), the package can be installed\nby adding `bartender` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:bartender, \"~\u003e 0.1.0\"}\n  ]\nend\n```\n\nDocumentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)\nand published on [HexDocs](https://hexdocs.pm). Once published, the docs can\nbe found at [https://hexdocs.pm/bartender](https://hexdocs.pm/bartender).\n\n## Usage\n\nYou can call `Bartender.Plug` explicitly with `Bartender.Plug.call(conn, MyApp.Guardian)` \n\nIf using in Phoenix, or any other app that uses `Router`, establish the `Plug` like so.\n\n```elixir\ndefmodule MyApp.Router do\n  use MyApp, :router\n\n  pipeline :api do\n    plug :accepts, [\"json\"]\n    plug Bartender.Plug, MyApp.Guardian\n  end\nend\n```\n\nThis `Plug` makes use of `Absinthe.Plug`, inserting the verified resource (in this case, a `current_user`) into the Connection, which can then be accessed from a Resolver. See the Absinthe [docs](https://hexdocs.pm/absinthe/context-and-authentication.html#content) for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcamirmas%2Fbartender","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcamirmas%2Fbartender","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcamirmas%2Fbartender/lists"}