travis-ci/travis-api — pull request #63 by drogus (2013-05-07 23:44:18+00:00)
Title: Tokens improvements

This pull request contains a few improvements for tokens:

* tokens can be now expired
* an endpoint can check for more than one scope, for example for logs it could be `[:private, :log]`, authorization is successful if any of the scopes matches
* you can specify extra data for tokens
* you can specify `required_params` for token, which will be checked against actual params, for example if require params are `{ job_id: '1' }`, the authorization will be successful only if `job_id: '1'` exists in params on the request. This can be used to scope token only for a specific resource