OmniAuth Azure DevOps is a Ruby gem that provides authentication for your Ruby applications via the Azure DevOps OAuth 2.0 authentication system.
Add this line to your application's Gemfile:
gem 'omniauth-azure-devops'
And then execute:
bundle install
-
Register your application with Azure DevOps to obtain the
AZURE_DEVOPS_CLIENT_ID
andAZURE_DEVOPS_CLIENT_SECRET
credentials. -
In your application configuration, add the following line to use the Azure DevOps OmniAuth strategy:
provider :azure_devops, ENV['AZURE_DEVOPS_CLIENT_ID'], ENV['AZURE_DEVOPS_CLIENT_SECRET'], scope: 'vso.auditlog etc...', callback_path: '/link/azure_devops/oauth_callback'
Replace
ENV['AZURE_DEVOPS_CLIENT_ID']
andENV['AZURE_DEVOPS_CLIENT_SECRET']
with your Azure DevOps client credentials. -
Implement the necessary routes and views to initiate the authentication process and handle the callback.
-
When users access the authentication route, they will be redirected to Azure DevOps for authentication. After successful authentication, Azure DevOps will redirect them back to your specified callback URL.
-
Access user information and tokens as needed in your application by utilizing the OmniAuth authentication data.
You can run the test suite using the following command:
rake spec
After checking out the repo, run bin/setup
to install dependencies. Then, run rake spec
to run the spec. You can also run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
.
Bug reports and pull requests are welcome on GitHub at https://github.com/rewindio/omniauth-azure-devops. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
This gem is available as open-source software under the MIT License.