Core Platform Team/Initiative/OAuth2/Epics, User Stories, and Requirements

Epic 1 - Add OAuth2 support to MediaWiki for use by web-based clients

 * Client application requests authorization token using authorization URL
 * Client application requests token using token URL
 * Client application requests user information, providing an authorization token
 * returns user id and username
 * optionally returns name and email
 * Admin configures user-based authorization (“Do you authorize Discourse to use your account?”) whitelist
 * User is able to click on button in Discourse and login when not logged in
 * User, if not whitelisted, gets authorization permission dialog
 * User is able to click on button in Discourse and be logged in when already logged in
 * User is able to click on button and log out Log-out
 * Admin configures logout behavior
 * OAuth 2.0 code passes security review
 * Implement OAuth 2.0 configuration variables in MediaWiki
 * Non-functional requirements:
 * OAuth 1.0 and OAuth 2.0 must be able to coexist in the codebase
 * OAuth 2.0 scopes must be defined (id, read, write, admin, ...)

Epic 2 - Add OAuth2 support to MediaWiki for use by API-based clients

 * Implement internal classes for using OAuth 2.0 tokens in API calls
 * Add OAuth 2.0 as an optional authorization method for one first API (REST API, probably)
 * Add OAuth 2.0 as an optional authz method for Action API
 * Add OAuth 2.0 as an optional authz method for RESTBase
 * Interface for requesting, managing, and deleting API keys
 * Interface for users to list and delete tokens
 * Clear all OAuth 2.0 tokens when password changes
 * Clear all OAuth 2.0 tokens on request
 * Security review