Implements an OAuth2 client to be used to interact with an OAuth2 provider.