Oauth2

Allikas: Excellent || Opendoc
Redaktsioon seisuga 25. märts 2021, kell 15:01 kasutajalt Kaupo (arutelu | kaastöö) (Uus lehekülg: 'OAuth Testing Tool with Google OAuth 2.0 playground You can create developer credentials before visiting the website. Use "<nowiki>https://developers.google.com/oauthplayground<...')
(erin) ←Vanem redaktsioon | Viimane redaktsiooni (erin) | Uuem redaktsioon→ (erin)
Mine navigeerimisribale Mine otsikasti

OAuth Testing Tool with Google OAuth 2.0 playground

You can create developer credentials before visiting the website. Use "https://developers.google.com/oauthplayground" as allowed redirect url.

  1. Goto page https://developers.google.com/oauthplayground/
  2. Click on OAuth 2.0 Configuration button
  3. Change the folling settings
    1. OAuth Endpoints: Custom
    2. Authorization endpoint: https://standard-id.hansaworld.com/oauth-authorize
    3. Token endpoint: https://standard-id.hansaworld.com/oauth-token
    4. OAuth Client ID: Client ID from MyStandard page
    5. OAuth Client Secret: Client Secret from MyStandard page.
  4. On left size you need to specify the scope that you want to authorize for. For HW Rest API there is no scope to specify so you can write anything in free text and click button "Authorize APIs
  5. If everything was fine with the request you will be redirected to StandardID website to authorize for the application
  6. After that you will be redirected back to google's playground
  7. Then you will be give option to "Exchange authorization code for tokens" - click the button. This will ask StandardID server for tokens that will be used for making API request
  8. Now you will be asked to specify request URL - specify your servers url with fill Rest API path. IMPORTANT - from this website the URL needs to have valid certificates. You can't put expired or invalid certificates on the server and there is no way how to go around this (at least I couldn't find - i have a server for testing with url https://restapi.hansaworld.com:1098). Full URL would look like this https://restapiserver.excellent.ee:1098/api/1/CUVc
  9. Click button "Send the request" - this will make the call to your server and return the data.