Skip to content

Commit 733bbc7

Browse files
committed
docs (OAuth2): add login/logout description for web
docs (OAuth2): fix referenses
1 parent 8602d9e commit 733bbc7

File tree

1 file changed

+12
-4
lines changed
  • docs/source/DeveloperGuide/OAuth2Authorization

1 file changed

+12
-4
lines changed

docs/source/DeveloperGuide/OAuth2Authorization/index.rst

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ Also added the ability to authorize without a certificate while configuring the
141141
Authorization API
142142
=================
143143

144-
With a new system component - :ref: `APIs <apis>`, was created Authorization API for *Framework* system (see :py:class:`~DIRAC.FrameworkSystem.API.AuthHandler`) which provides the necessary endpoints for interaction with DIRAC AS.
144+
With a new system component - :ref:`APIs <apis>`, was created Authorization API for *Framework* system (see :py:class:`~DIRAC.FrameworkSystem.API.AuthHandler`) which provides the necessary endpoints for interaction with DIRAC AS.
145145

146146

147147
Token Manager
@@ -154,7 +154,7 @@ Identity Provider
154154
=================
155155

156156
Since DIRAC is not going to perform the function of user account management, it delegates this function as much as possible to third parties services where VOs should be registered and where there are VO administrators who will deal with it.
157-
Such resources are described as `IdProviders`, see :ref: `idps`.
157+
Such resources are described as `IdProviders`, see :ref:`resourcesIdProvider`.
158158

159159

160160
Tornado Framework
@@ -241,7 +241,15 @@ Web portal
241241
.. image:: /_static/Systems/FS/OAuth2/WebAppLoginFlow.png
242242
:alt: DIRAC web login flow.
243243

244-
(docs in progress)
244+
The diagram shows the following steps:
245+
1) The user selects an identity provider for authorization in the web portal.
246+
#) After receiving this request from the browser, the web server creates an authorization session, and redirects the user to DIRAC AS by initiating the **OAuth 2.0 Authorization Code flow**.
247+
#) DIRAC AS will initialize **OAuth 2.0 Authorization Code flow** with choosed IdP.
248+
#) When the user has successfully logged in, DIRAC AS redirects him back to the web server with an authorization code.
249+
#) Web server sends this code to the DIRAC AS along with the client credentials and recieve an access and refresh tokens.
250+
#) The web server creates an http only secure cookie with the received tokens and store an access token in sessionStorage (see https://www.w3schools.com/jsref/prop_win_sessionstorage.asp for more details). This token can be used by JS code from the user's browser (currently not used).
251+
252+
This scheme is being revised to simplify it.
245253

246254
***********
247255
Logging out
@@ -274,4 +282,4 @@ Click on the username to select "Log out".
274282
.. image:: /_static/Systems/FS/OAuth2/revokeTokenWeb.png
275283
:alt: DIRAC web logout flow.
276284

277-
(docs in progress)
285+
The web server receives a request from the user's browser to end the session and made revoke refresh token request to DIRAC AS. After that cleans cookies.

0 commit comments

Comments
 (0)