tpavlek / oauth2-bnet Goto Github PK
View Code? Open in Web Editor NEWA Battle.net provider for league/oauth2-client
A Battle.net provider for league/oauth2-client
No support for non-US servers
There is a typo in the example code ; $token = $this->provider->getAccessToken("authorizaton_code", [
should be $token = $this->provider->getAccessToken("authorization_code", [
(the i
of authorization
is missing)
With the testing environment set up, running test/sc2-example.php
sends me to BattleNet and then back to the file, but with the following error:
Fatal error: Uncaught exception 'League\OAuth2\Client\Provider\Exception\IdentityProviderException' with message 'Internal server error' in D:\www\public\scpartners-laravel\oauth2-bnet\src\Provider\BattleNet.php:89
Stack trace:
#0 D:\www\public\scpartners-laravel\oauth2-bnet\vendor\league\oauth2-client\src\Provider\AbstractProvider.php(620): Depotwarehouse\OAuth2\Client\Provider\BattleNet->checkResponse(Object(GuzzleHttp\Psr7\Response), Array)
#1 D:\www\public\scpartners-laravel\oauth2-bnet\vendor\league\oauth2-client\src\Provider\AbstractProvider.php(536): League\OAuth2\Client\Provider\AbstractProvider->getResponse(Object(GuzzleHttp\Psr7\Request))
#2 D:\www\public\scpartners-laravel\oauth2-bnet\test\sc2-example.php(14): League\OAuth2\Client\Provider\AbstractProvider->getAccessToken('authorization_c...', Array)
#3 {main} thrown in D:\www\public\scpartners-laravel\oauth2-bnet\src\Provider\BattleNet.php on line 89
Well, after authorization my app say Grant "League\OAuth2\Client\Grant\AuthorizatonCode" must extend AbstractGrant. Installed via composer.
All in the title.
Thanks.
to retrieve portrait url in the entity class:
$this->portrait_url = substr($attributes['portrait']->url, 0, strpos($attributes['portrait']->url, '-'))
. '-' . $attributes['portrait']->offset . ".jpg";
Scenario:
It will response 404 "Sc2 Profile Not Found" and Battlenet\checkResponse() will throw error "Undefined index: error_description"
Shouldn't the end point of this be https://eu.api.battle.net/account/user
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.