Oauth2: erinevus redaktsioonide vahel

Allikas: Excellent || Opendoc
Mine navigeerimisribale Mine otsikasti
(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<...')
 
Resümee puudub
3. rida: 3. rida:
You can create developer credentials before visiting the website. Use "<nowiki>https://developers.google.com/oauthplayground</nowiki>" as allowed redirect url.
You can create developer credentials before visiting the website. Use "<nowiki>https://developers.google.com/oauthplayground</nowiki>" as allowed redirect url.


# Goto page <code>https://developers.google.com/oauthplayground/</code>
#Goto page <code>https://developers.google.com/oauthplayground/</code>
# Click on OAuth 2.0 Configuration button
#Click on OAuth 2.0 Configuration button
# Change the folling settings
#Change the folling settings
## OAuth Endpoints: Custom
##OAuth Endpoints: Custom
## Authorization endpoint: <code><nowiki>https://standard-id.hansaworld.com/oauth-authorize</nowiki></code>
##Authorization endpoint: <code><nowiki>https://standard-id.hansaworld.com/oauth-authorize</nowiki></code>
## Token endpoint: <code><nowiki>https://standard-id.hansaworld.com/oauth-token</nowiki></code>
##Token endpoint: <code><nowiki>https://standard-id.hansaworld.com/oauth-token</nowiki></code>
## OAuth Client ID: Client ID from MyStandard page
##OAuth Client ID: Client ID from MyStandard page
## OAuth Client Secret: Client Secret from MyStandard page.  
##OAuth Client Secret: Client Secret from MyStandard page.
# 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
#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
# If everything was fine with the request you will be redirected to StandardID website to authorize for the application
#If everything was fine with the request you will be redirected to StandardID website to authorize for the application
# After that you will be redirected back to google's playground
#After that you will be redirected back to google's playground
# 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
#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
# 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 <code><nowiki>https://restapi.hansaworld.com:1098</nowiki></code>). Full URL would look like this <code><nowiki>https://restapiserver.excellent.ee:1098/api/1/CUVc</nowiki></code>
#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 <code><nowiki>https://restapi.hansaworld.com:1098</nowiki></code>).   Full URL would look like this <code><nowiki>https://restapiserver.excellent.ee:1098/api/1/CUVc</nowiki></code>
# Click button "Send the request" - this will make the call to your server and return the data.
#Click button "Send the request" - this will make the call to your server and return the data.

Redaktsioon: 25. märts 2021, kell 15:03

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.