Desktop Application Authorization Flow
Desktop application flow is a slightly modified version of the client-side flow. Since desktop applications do not normally run their own web servers, we cannot redirect back to the desktop app URL. Instead, we will redirect to an internal url with the returned fields. Desktop applications can listen to the browser URL changes. Once a URL is matched against a special Platform URL, desktop application can get the access token and other parameters from the URL. Autentimine & AutoriseerimineTo enter the authentication/authorization desktop client flow, you must point an embedded browser to the authorization url and pass the following parameters: Oauth URL
https://www.geni.com/platform/oauth/authorize
Parameetrid
Näide
https://www.geni.com/platform/oauth/authorize?client_id=YOUR_APP_KEY&response_type=token&display=desktop
Kui kasutaja on juba sisse logitud, valideerime sisselogimisküpsise, mille oleme kasutaja brauserisse salvestanud ja autentime kasutaja.If the user is not logged in, they are prompted to enter their credentials: Once we have successfully authenticated the user, we will prompt the user to authorise your application: If the user presses Don't Allow, your app is not authorised. Kasutaja suunatakse (läbi HTTP 302) kindlalale URL aadresssile, mis sisaldab alljärgneva veateate: Vastuseväljad
Näide
https://www.geni.com/platform/oauth/auth_failed#status=unauthorized&message=user+canceled
If the user presses Allow, your app is authorised. The user will be redirected (via HTTP 302) to the special URL with an authorization code: Vastuseväljad
Näide
https://www.geni.com/platform/oauth/auth_success#access_token=ACCESS_TOKEN_GENERATED_BY_SERVER
&expires_in=SECONDS_UNTIL_IT_IS_EXPIRED
|