{"id":22546630,"url":"https://github.com/prx/prx_auth-rails","last_synced_at":"2025-10-07T01:54:10.512Z","repository":{"id":30785220,"uuid":"34342120","full_name":"PRX/prx_auth-rails","owner":"PRX","description":"Rails integration for next generation PRX Authorization system.","archived":false,"fork":false,"pushed_at":"2025-07-22T17:35:46.000Z","size":174,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-08-01T11:17:37.221Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/PRX.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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,"zenodo":null}},"created_at":"2015-04-21T17:35:38.000Z","updated_at":"2025-07-22T17:35:40.000Z","dependencies_parsed_at":"2024-12-20T18:21:57.217Z","dependency_job_id":"75ec160a-edbc-46ac-94db-f08ef1d8e88d","html_url":"https://github.com/PRX/prx_auth-rails","commit_stats":{"total_commits":98,"total_committers":4,"mean_commits":24.5,"dds":0.5408163265306123,"last_synced_commit":"300956b9b350e7a206e5bd3901c13ebeba174110"},"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"purl":"pkg:github/PRX/prx_auth-rails","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PRX%2Fprx_auth-rails","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PRX%2Fprx_auth-rails/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PRX%2Fprx_auth-rails/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PRX%2Fprx_auth-rails/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PRX","download_url":"https://codeload.github.com/PRX/prx_auth-rails/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PRX%2Fprx_auth-rails/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278708028,"owners_count":26031932,"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","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":"2024-12-07T15:08:24.727Z","updated_at":"2025-10-07T01:54:10.497Z","avatar_url":"https://github.com/PRX.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PrxAuth::Rails\n\nRails integration for next generation PRX Authorization system. This\nprovides common OpenId authorization patterns used in PRX apps.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n    gem 'prx_auth-rails'\n\nAnd then execute:\n\n    $ bundle\n\n## Usage\n\nInstalling the gem in a Rails project will automatically add the\nappropriate Rack middleware to your Rails application and add two\nmethods to your controllers. These methods are:\n\n* `prx_auth_token`: returns a token (similar to PrxAuth::Token) which\n  automatically namespaces queries. The main methods you will be\ninterested in are `authorized?`, `globally_authorized?` and `resources`.\nMore information can be found in PrxAuth.\n\n* `prx_authenticated?`: returns whether or not this request includes a\n  valid PrxAuth token.\n\nThis will let set up the Rails app to be ready for HTTP requests\nassociated with an OpenId access token.\n\n### Configuration\n\nGenerally, configuration is not required and the gem aims for great\ndefaults, but you can override some settings if you need to change the\ndefault behavior.\n\nIf you're using the Rails server-side session flow, you must supply the\nclient_id via configuration.\n\nIn your rails app, add a file to config/initializers called\n`prx_auth.rb`:\n\n```ruby\nPrxAuth::Rails.configure do |config|\n\n  # enables automatic installation of token parser middleware\n  config.install_middleware = true # default: true\n\n  # set the ID host\n  config.id_host = 'id.staging.prx.tech' # default: id.prx.org\n\n  # automatically adds namespace to all scoped queries, e.g. .authorized?(:foo) will be treated\n  # as .authorized?(:my_great_ns, :foo). Has no impact on unscoped queries.\n  config.namespace = :my_great_ns   # default: derived from Rails::Application name.\n                                    #          e.g. class Feeder \u003c Rails::Application =\u003e :feeder\n\n  # Set up the PRX OpenID client_id if using the backend rails sessions flow.\n  config.client_id = '\u003csome client id\u003e'\nend\n```\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprx%2Fprx_auth-rails","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprx%2Fprx_auth-rails","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprx%2Fprx_auth-rails/lists"}