{"id":28388821,"url":"https://github.com/ueberauth/guardian_pemfile_config_example","last_synced_at":"2026-02-26T16:51:56.595Z","repository":{"id":49256902,"uuid":"187649446","full_name":"ueberauth/guardian_pemfile_config_example","owner":"ueberauth","description":"Example of a guardian configuration using a private and public pem file","archived":false,"fork":false,"pushed_at":"2021-06-21T17:25:03.000Z","size":9,"stargazers_count":7,"open_issues_count":1,"forks_count":1,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-06-27T07:40:32.066Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Elixir","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/ueberauth.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}},"created_at":"2019-05-20T13:48:52.000Z","updated_at":"2024-09-03T14:19:09.000Z","dependencies_parsed_at":"2022-08-29T22:00:54.850Z","dependency_job_id":null,"html_url":"https://github.com/ueberauth/guardian_pemfile_config_example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ueberauth/guardian_pemfile_config_example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ueberauth%2Fguardian_pemfile_config_example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ueberauth%2Fguardian_pemfile_config_example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ueberauth%2Fguardian_pemfile_config_example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ueberauth%2Fguardian_pemfile_config_example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ueberauth","download_url":"https://codeload.github.com/ueberauth/guardian_pemfile_config_example/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ueberauth%2Fguardian_pemfile_config_example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29865399,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-26T16:38:37.846Z","status":"ssl_error","status_checked_at":"2026-02-26T16:37:58.932Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2025-05-30T23:16:01.096Z","updated_at":"2026-02-26T16:51:56.559Z","avatar_url":"https://github.com/ueberauth.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Example of a guardian configuration using a private and public pem file\n\n*This is just an example of how to get up and running and should not be used in production*\n\n### Highlights\nPem files are put in the priv folder and fetched with the secret handler which is configured in the config file.\n\n```elixir\nconfig :pem_guardian, PemGuardian.Guardian,\n  issuer: \"pem_guardian\",\n  allowed_algos: [\"RS512\"],\n  secret_fetcher: PemGuardian.SecretFetcher\n```\n\n``` elixir \ndef fetch_signing_secret(_module, _opts) do\n    secret =\n      \"rsa-2048.pem\"\n      |\u003e fetch()\n\n    {:ok, secret}\n  end\n\n  def fetch_verifying_secret(_module, _headers, _opts) do\n    secret =\n      \"rsa-2048.pub\"\n      |\u003e fetch()\n\n    {:ok, secret}\n  end\n\n  defp fetch(relative_path) do\n    :code.priv_dir(:debug_guardian)\n    |\u003e Path.join(relative_path)\n    |\u003e JOSE.JWK.from_pem_file()\n  end\n  ```\n  \n  Example can be verified with the following commands\n ``` elixir \n {:ok,token,_} = PemGuardian.Guardian.encode_and_sign(%{id: \"1\"})\n PemGuardian.Guardian.decode_and_verify(token) \n ```\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fueberauth%2Fguardian_pemfile_config_example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fueberauth%2Fguardian_pemfile_config_example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fueberauth%2Fguardian_pemfile_config_example/lists"}