SoundCloud authentication rewrite and initial Kernel tests
Summary
- The SoundCloud service is now the SoundCloud
Auth
authentication service, which implements the OAuth procedures. - SoundCloud
Client
service is new. It contains, configures, and provides as a service the Martin1982 OAuth provider for SoundCloud, which is used by theAuth
service. Auth implements most of the protocol, Client houses and configures the third-party OAuth package. This ended up reducing the size and readability of theAuth
service. - I have reviewed and re-written the
Auth
service in a more functional style using Monads from the widmogrod package for flow control and return values within the service and it's current consumers (service configuration forms).
Testing
- There are two initial Kernel tests for the SoundCloud
Auth
service. They also cover the newClient
service. - There are no initial unit tests, only the Kernel tests, and therefore no coverage for SoundCloud code as of yet.
- The Kernel tests are against the live production API. This means that while they execute the authentication service as accurately as a production environment, they are subject to rate-limiting. Tests are not executed as part production code, only exclusively as part of PHPUnit which is a separate process.
- In the near future I'd like to have unit tests using API mocks instead of production APIs that are not subject to rate-limiting, do not use production API credentials, and provide the code coverage that Kernel tests do not. I'm not doing that as part of this merge request as this ticket has been open for a month.
Edited by Richard Allen