{"id":17300870,"url":"https://github.com/chtjonas/omniauth-ucam-raven","last_synced_at":"2026-02-06T14:31:18.354Z","repository":{"id":33279990,"uuid":"156111634","full_name":"CHTJonas/omniauth-ucam-raven","owner":"CHTJonas","description":"OmniAuth strategy for Cambridge University's Raven SSO system","archived":false,"fork":false,"pushed_at":"2024-09-30T17:32:27.000Z","size":56,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-06T22:42:53.480Z","etag":null,"topics":["cambridge","cambridge-university","omniauth-strategy","raven","ruby","sso-authentication","ucam","university","uoc"],"latest_commit_sha":null,"homepage":"","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/CHTJonas.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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-11-04T18:22:26.000Z","updated_at":"2024-09-30T17:32:29.000Z","dependencies_parsed_at":"2024-10-15T11:30:51.397Z","dependency_job_id":"4b73e3af-b751-4bac-8b96-ede9b23ea8e6","html_url":"https://github.com/CHTJonas/omniauth-ucam-raven","commit_stats":{"total_commits":35,"total_committers":3,"mean_commits":"11.666666666666666","dds":"0.37142857142857144","last_synced_commit":"4af5ece9129d6c807ba418785edd18aacb779e1a"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CHTJonas%2Fomniauth-ucam-raven","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CHTJonas%2Fomniauth-ucam-raven/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CHTJonas%2Fomniauth-ucam-raven/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CHTJonas%2Fomniauth-ucam-raven/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CHTJonas","download_url":"https://codeload.github.com/CHTJonas/omniauth-ucam-raven/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236615467,"owners_count":19177564,"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":["cambridge","cambridge-university","omniauth-strategy","raven","ruby","sso-authentication","ucam","university","uoc"],"created_at":"2024-10-15T11:30:44.364Z","updated_at":"2026-02-06T14:31:18.280Z","avatar_url":"https://github.com/CHTJonas.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e **Warning**\n\u003e If you are viewing this README on the `main` branch then please note that this may contain as yet unreleased changes.\n\u003e You probably want to checkout a tag using the GitHub interface and view documentation for that specific version.\n\n# Raven OmniAuth strategy\n\nThis Ruby gem provides an OmniAuth strategy for authenticating using the [Raven SSO System](https://raven.cam.ac.uk), provided by the University of Cambridge.\n\n## Installation\n\nAdd the strategy to your `Gemfile`:\n\n```ruby\ngem 'omniauth-ucam-raven'\n```\n\nAnd then run `bundle install`.\n\nYou then need to download the Raven service RSA public key(s) in PEM format from ~the project pages [here](https://raven.cam.ac.uk/project/keys/)~ the mirror [here](https://w3.charliejonas.co.uk/mirror/raven/keys/) and store it somewhere that is not writable by your web application. Tip: it's the one without the `.crt` file extension.\n\n## Usage\n\nThe strategy expects a path to the directory where you store your Raven public key(s).\nThis allows multiple keys to be supported in order to facilitate rollover or multiple backend auth servers.\n\nIf you're using Rails, you'll want to add the following to an initialisers e.g. `config/initializers/omniauth.rb` and then restart your application server:\n\n```ruby\nRails.application.config.middleware.use OmniAuth::Builder do\n  provider \"ucam-raven\", Rails.root.join(\"vendor\", \"ucam-raven-public-keys\")\nend\n```\n\nFor Sinatra and other Rack-based frameworks, you can integrate the strategy into your middleware e.g. in a `config.ru`:\n\n```ruby\nuse OmniAuth::Builder do\n  provider \"ucam-raven\", '/path/to/keys/dir'\nend\n```\n\nUpon authentication, the user's details will be available in the `request.env['omniauth.auth']` object as show in the example below. Each field is well documented in the [protocol specification](https://w3.charliejonas.co.uk/mirror/raven/waa2wls-protocol.txt).\n\n```\n{\n  \"provider\"=\u003e\"ucam-raven\",\n  \"uid\"=\u003e\"crsid\",\n  \"info\"=\u003e{\"name\"=\u003enil, \"ptags\"=\u003e[\"current\"]},\n  \"credentials\"=\u003e{\"auth\"=\u003e\"\", \"sso\"=\u003e[\"pwd\"]},\n  \"extra\"=\u003e{\"id\"=\u003e\"dateandtime\", \"lifetime\"=\u003e\"sessionlifetime\", \"parameters\"=\u003e\"your params string returned to you\"}\n}\n```\n\nWhen prototyping you application, you may find it helpful to add the following line of code, otherwise GET requests to the application authentication URL won't work.\n\n```ruby\nOmniAuth.config.allowed_request_methods = [:post, :get]\n```\n\n## Configuration\n\nThe Ucam-Raven strategy will work straight out of the box but you can apply custom configuration if you so desire by appending an options hash to the arguments when `provider` is called, for example:\n\n```ruby\nuse OmniAuth::Builder do\n  keys_dir = Rails.root.join(\"vendor\", \"ucam-raven-public-keys\")\n  options = { desc: 'my description', msg: 'my message', params: 'string to be returned after login', date: true }\n  provider \"ucam-raven\", keys_dir, opts\nend\n```\n\nIf you are looking to use the strategy with the [SRCF Goose authentication service](https://auth.srcf.net/) rather than Raven then you can include the following configuration:\n\n```ruby\nuse OmniAuth::Builder do\n  keys_dir = Rails.root.join(\"vendor\", \"ucam-raven-public-keys\")\n  provider \"ucam-raven\", keys_dir, honk: true\nend\n```\n\nSee the code for the [example Sinatra app](https://github.com/CHTJonas/omniauth-ucam-raven/blob/main/examples/sinatra) for a hands-on example of this and [here](https://github.com/CHTJonas/omniauth-ucam-raven/blob/main/lib/omniauth/strategies/ucam-raven.rb#L18) for a full list of configurable options.\nEach option is fully documented in the [specification](https://w3.charliejonas.co.uk/mirror/raven/waa2wls-protocol.txt).\n\nFor additional information, please refer to the [OmniAuth wiki](https://github.com/intridea/omniauth/wiki).\n\n## License\n\nomniauth-ucam-raven is released under the MIT License.\nCopyright (c) 2018 Charlie Jonas.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchtjonas%2Fomniauth-ucam-raven","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchtjonas%2Fomniauth-ucam-raven","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchtjonas%2Fomniauth-ucam-raven/lists"}