No release in over 3 years
Low commit activity in last 3 years
Rack auth for Travis CI webhook requests!
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

>= 0
 Project Readme

Rack::Auth::Travis

⚠️ This middleware does not work with the public hosted Travis CI anymore ⚠️

For more details, see this blog post and the related documentation for verifying signatures.

It's a Rack auth thing for Travis webhook requests!

Install

Depend on it!

# Gemfile
gem 'rack-auth-travis'

Usage

Add it to your rack!

Take a look at the example or do something like this:

# config.ru
require './my_fancy_app'
require 'rack-auth-travis'

use Rack::Auth::Travis
run MyFancyApp.new

When use'd without arguments, Rack::Auth::Travis will add an ENV-based authenticator that will look for the following variables and use their values to authenticate the Authorization header:

  • TRAVIS_AUTH_<uppercased-slug> - generated from the "repo slug" with non-alphanumeric characters replaced with underscores, e.g. octocat/Knife-Spoon becomes TRAVIS_AUTH_OCTOCAT_KNIFE_SPOON
  • TRAVIS_AUTH_DEFAULT

If one of these ENV variables exists, its value will be hashed with the "repo slug" and compared to the Authorization header sent from Travis.