jenkinsci/credentials-plugin — pull request #9 by mattmoor (2013-12-04 21:17:47+00:00)
Title: Add OAuthCredentials, related Domain logic, a new DomainRequirementProvider extension point, and the RequiresDomain attribute

This commit adds support for OAuth access token based credentials.

A notable distinction from other kinds of credentials is that OAuth credentials take an OAuthScopeRequirement argument for providing credentials, due to the inherently scoped nature of OAuth tokens.

This commit also adds support for DomainRequirement discovery via @RequiresDomain and the DomainRequirementProvider extension point.

See DescribableDomainRequirementProvider for an example implementation of such a provider.

The domain discovery surfaced through this new "provider" is useful to build OAuthScopeSpecifications from OAuthScopeRequirements; the scopes for which are impractical for users to type, but something on which they may want to filter.