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.
 

authorization for the new api

Author
Ashtar Veres
Algo Industries
#1 - 2016-12-21 21:30:23 UTC
So there's this new esi API available, the documentation of endpoints is on swagger. And works very well.
Unfortunately I was unable to find any documentation on the authorization process.
I've found some explanation about authorization here http://eveonline-third-party-documentation.readthedocs.io/en/latest/sso/intro.html
but, from reverse engineering the new documentation site https://esi.tech.ccp.is it seems tat the authorization has also changed
for example: the old authorization was made of two requests one will return code and the other token
the new one returns the token on the same run like this:
http://dev.eve-pi-manager.space/auth/callback#access_token=UCwg_h13JRChKLhoSKYrvwb8PxqPRQEe18JLMfxKZmLdN5UO99PR1jz9nhjxxx8TF46qqBH5DTaPZ3IV_Yt6RA2&token_type=Bearer&expires_in=1200&state=evesso

I was unable to find any documentation about the response (for example "expires_in" minutes/seconds/years...) nor about the request itself: what does "realm", "state" means

Does anyone know any info about it? Did I miss a documentation website?

Thanks!
Blacksmoke16
Imperial Academy
#2 - 2016-12-21 23:20:23 UTC
Authorization works just the same as it did for CREST; using a token from SSO to auth the endpoints.

A walkthrough on how to do that is in the third party docs as you linked.

http://eveonline-third-party-documentation.readthedocs.io/en/latest/sso/authentication.html

Phrynohyas Tig-Rah
SoT
DarkSide.
#3 - 2016-12-22 08:37:40 UTC
Ashtar Veres
Algo Industries
#4 - 2016-12-22 12:59:51 UTC
Blacksmoke16 wrote:
Authorization works just the same as it did for CREST; using a token from SSO to auth the endpoints.

A walkthrough on how to do that is in the third party docs as you linked.

http://eveonline-third-party-documentation.readthedocs.io/en/latest/sso/authentication.html




Well, from my examples you can see it's not. I mean it does work as in the documentation but I get 500 server error. But when looking on the esi new services and how CCP themselves do the authorization then use is in one request to get token, again, as I've explained in the post. So clearly there are more to the documentation about the authorization I was unable to find.
Blacksmoke16
Imperial Academy
#5 - 2016-12-22 14:57:34 UTC  |  Edited by: Blacksmoke16
I'm assuming you went on the dev site and requested the new esi scopes for what you are trying to use? The SSO process is the same but CREST scopes != ESI scopes. As if you are able to get a token/refresh token you did it right.

https://developers.eveonline.com/applications

EDIT: Rereading your post. expires_in is in seconds as all tokens only live for 20min. After 20min you would have to use a refresh_token to get a new normal token. State is an An opaque value used by the client to maintain state between the request and callback. Optional but recommended.