diff --git a/docs/providers.md b/docs/providers.md index 0dbd33c03..0705ed64c 100644 --- a/docs/providers.md +++ b/docs/providers.md @@ -46,6 +46,7 @@ TwitchTV | OAuth2 | [X] | [X] | Authentiq | OAuth2 | [X] | [X] | | | Spotify | OAuth2 | [X] | [X] | | | WeChat | OAuth2 | [X] | [X] | | | +SteemConnect | OAuth2 | [X] | [X] | | | {% include callout.html content="Some providers such as Google and Yahoo may use multiple protocols for their APIs and as naming convention we append the protocol's name to the adapter's (Often the case with OpenID adapters as those might be subject to removal by providers in near future due to deprecation of the OpenID protocol)." type="default" %} diff --git a/src/Provider/SteemConnect.php b/src/Provider/SteemConnect.php new file mode 100644 index 000000000..f3b4727aa --- /dev/null +++ b/src/Provider/SteemConnect.php @@ -0,0 +1,70 @@ +apiRequest('api/me'); + + $data = new Data\Collection($response); + + if (! $data->exists('result')) { + throw new UnexpectedApiResponseException('Provider API returned an unexpected response.'); + } + + $userProfile = new User\Profile(); + + $data = $data->filter('result'); + + $userProfile->identifier = $data->get('id'); + $userProfile->description = $data->get('about'); + $userProfile->photoURL = $data->get('profile_image'); + $userProfile->webSiteURL = $data->get('website'); + $userProfile->displayName = $data->get('name'); + + return $userProfile; + } +}