Oauth2 ENG: erinevus redaktsioonide vahel
Resümee puudub |
Resümee puudub |
||
(ei näidata sama kasutaja üht vahepealset redaktsiooni) | |||
2. rida: | 2. rida: | ||
#Go to https://mystandard.hansaworld.com/edit/devcred | #Go to https://mystandard.hansaworld.com/edit/devcred | ||
#You can create developer credentials here. Use "<nowiki>https://developers.google.com/oauthplayground</nowiki>" as allowed redirect url. [[Fail:Mystandard Setting.png|raamita]] | #You can create developer credentials here. Use "<nowiki>https://developers.google.com/oauthplayground</nowiki>" as allowed redirect url. <br />[[Fail:Mystandard Setting.png|raamita]] | ||
#Goto page <nowiki>https://developers.google.com/oauthplayground/</nowiki> | #Goto page <nowiki>https://developers.google.com/oauthplayground/</nowiki> | ||
#Click on OAuth 2.0 Configuration button | #Click on OAuth 2.0 Configuration button | ||
10. rida: | 10. rida: | ||
##Token endpoint: <nowiki>https://standard-id.hansaworld.com/oauth-token</nowiki> | ##Token endpoint: <nowiki>https://standard-id.hansaworld.com/oauth-token</nowiki> | ||
##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[[Fail:Google lehe setting.png|tühi|pisi|398x398px]]<br /> | ||
#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" | ||
Viimane redaktsioon: 1. aprill 2021, kell 10:07
OAuth Testing Tool with Google OAuth 2.0 playground
- Go to https://mystandard.hansaworld.com/edit/devcred
- You can create developer credentials here. Use "https://developers.google.com/oauthplayground" as allowed redirect url.
- Goto page https://developers.google.com/oauthplayground/
- Click on OAuth 2.0 Configuration button
- Change the folling settings:
- OAuth Endpoints: Custom
- Authorization endpoint: https://standard-id.hansaworld.com/oauth-authorize
- Token endpoint: https://standard-id.hansaworld.com/oauth-token
- OAuth Client ID: Client ID 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"
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