Implement a OAuth2BaseProvider abstract class, and OAuthProvider that uses config values to perform a standard OAuth flow, which can be overriden to create customized flows, or instantiated using a config object as such:
RedditOAuth2Provider provides apiKey and apiSecret as aliases to clientId and clientSecret and implements its own getTokens() method due to the usage of URLFormEncodedHTTP POST requests on the Reddit API.
Overview
Implement a
OAuth2BaseProvider
abstract class, andOAuthProvider
that uses config values to perform a standard OAuth flow, which can be overriden to create customized flows, or instantiated using a config object as such:RedditOAuth2Provider
providesapiKey
andapiSecret
as aliases toclientId
andclientSecret
and implements its owngetTokens()
method due to the usage ofURLFormEncoded
HTTP POST
requests on the Reddit API.