These forums have been archived and are now read-only.

The new forums are live and can be found at https://forums.eveonline.com/

EVE Technology Lab

 
  • Topic is locked indefinitely.
 

[PHP] CREST & SSO made simple

Author
Yogi Berimor
Monkey Attack Squad
Goonswarm Federation
#1 - 2016-02-11 19:57:03 UTC  |  Edited by: Yogi Berimor
Hey folks!

The fact that there was no available solution to easily work with CREST/SSO really annoyed me so i took action.

Introducing EVELabs Oauth2 provider for EVE Online.

Highlights

  1. Complete Authorization Code Grant & Refresh Token Grant support
  2. Top quality code
  3. 100% code coverage
  4. Easy to integrate with your app
  5. Based on Oauth2 Client by The League of Extraordinary Packages
  6. Well documented


When to use

  • You want EVE SSO on your website/app but don't want to dive into all the mess
  • You need a quality solution to easily fetch data from CREST API


How to use

  1. Use composer to install:
    composer require evelabs/oauth2-eveonline
  2. Read README for examples.


Framework integration
If your app is based on Symfony2 then you're in luck: there is an awesome Oauth2 bundle by KnpUniversity which offers easy integration of any Oauth2 social service. It is also supports EVE Online out-of-the-box. Check it's github for more info.


As a really quick demo this is how CREST API call looks like:

$request = $provider->getAuthenticatedRequest(
    'GET',
    'https://crest-tq.eveonline.com/characters/{characterID}/',
    $accessToken->getToken()
);

$response = $provider->getResponse($request);


Anyway, enough talking -- just go check it out.
Any feedback is appreciated.
Cheers!