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.
 

Authed crest documentation

Author
He dares
School of Applied Knowledge
Caldari State
#1 - 2015-04-03 12:21:08 UTC
I cant find any documentation on how to make authed calls to crest and how to use the refresh token can anyone point me in the right direction.
Steve Ronuken
Fuzzwork Enterprises
Vote Steve Ronuken for CSM
#2 - 2015-04-03 15:19:30 UTC
If you can read php https://github.com/fuzzysteve/eve-sso-auth and https://github.com/fuzzysteve/CrestLibrary may be of interest.

Woo! CSM XI!

Fuzzwork Enterprises

Twitter: @fuzzysteve on Twitter

Aineko Macx
#3 - 2015-04-03 15:23:07 UTC
There is some documentation on the developer site.

As for the refresh token, you use it to get an ephemeral access token, which is then used to request the actual data. Feel free to study this php code.
Ortho Loess
Escalated.
OnlyFleets.
#4 - 2015-04-06 18:22:56 UTC
There's a new set of documentation, that will one day be utterly awesome!

For now it's still in it's infancy, but I very recently added some stuff on CREST and authed CREST. It would be good to know if it's actually helpful.

http://eveonline-third-party-documentation.readthedocs.org/

It occurs to me (in light of your question), that while it talks about getting an access token, I never put in anything about how to go about using it...

I guess that's the topic for my next effort :)
He dares
School of Applied Knowledge
Caldari State
#5 - 2015-04-07 07:23:21 UTC
Ortho Loess wrote:
There's a new set of documentation, that will one day be utterly awesome!

For now it's still in it's infancy, but I very recently added some stuff on CREST and authed CREST. It would be good to know if it's actually helpful.

http://eveonline-third-party-documentation.readthedocs.org/

It occurs to me (in light of your question), that while it talks about getting an access token, I never put in anything about how to go about using it...

I guess that's the topic for my next effort :)


Thats basicly the issue i was having it does the same thing for the refresh token.
Slvrsmth
Native Freshfood
Minmatar Republic
#6 - 2015-04-07 07:41:16 UTC  |  Edited by: Slvrsmth
The auth token is used in a pretty much standard way: you add "Authorization" header to every request you make, with value "Bearer XXXXXXXXX" where X'es are the auth token you received earlier. If you are using some universal REST library for your requests, they usually have this functionality built in. Look for OAuth or access_token keywords in the documentation.

Refresh token is used when auth token expires (and that currently happens every 20min because :ccp:) - you then make a POST request to "https://login.eveonline.com/oauth/token" with following params:


      grant_type: 'refresh_token',
      refresh_token: USERS_REFRESH_TOKEN,
      client_id: YOUR_APP_CLIENT_ID,
      client_secret: YOUR_APP_CLIENT_SECRET


The response should contain a new auth token for that user, valid for another 20min.

All in all, the SSO follows established OAuth 2.0 practices - you can usually follow examples from elsewhere. For example, the solution by Blizzard for Battle.net auth is nearly the same - only the URLs differ.

Carebearium - find the best solar system for you!

He dares
School of Applied Knowledge
Caldari State
#7 - 2015-04-07 07:44:45 UTC
Slvrsmth wrote:
The auth token is used in a pretty much standard way: you add "Authorization" header to every request you make, with value "Bearer XXXXXXXXX" where X'es are the auth token you received earlier. If you are using some universal REST library for your requests, they usually have this functionality built in. Look for OAuth or access_token keywords in the documentation.

Refresh token is used when auth token expires (and that currently happens every 20min because :ccp:) - you then make a POST request to "https://login.eveonline.com/oauth/token" with following params:


      grant_type: 'refresh_token',
      refresh_token: USERS_REFRESH_TOKEN,
      client_id: YOUR_APP_CLIENT_ID,
      client_secret: YOUR_APP_CLIENT_SECRET


The response should contain a new auth token for that user, valid for another 20min.


Thank you thats what i was looking for.
Steve Ronuken
Fuzzwork Enterprises
Vote Steve Ronuken for CSM
#8 - 2015-04-07 11:10:07 UTC
That's one way to do the refresh token.

you can also do it passing an Authorization header of
Basic XXXXXXXXXXXXX
where XXXXXXXXXXX is base64_encode(clientid.':'.secret)

along with the grant type and refresh token as parameters to a post.

Woo! CSM XI!

Fuzzwork Enterprises

Twitter: @fuzzysteve on Twitter