You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The *oauth2-server* module is typically not used directly but through one of the available adapters, converting the interface to a suitable one for the HTTP server framework in use.
6
+
7
+
.. framework-agnostic but there are several officially supported adapters available for popular HTTP server frameworks such as Express_ and Koa_.
- Inherit from :doc:`OAuth2Server </api/oauth2-server>`.
24
+
25
+
- Override :ref:`authenticate() <OAuth2Server#authenticate>`, :ref:`authorize() <OAuth2Server#authorize>` and :ref:`token() <OAuth2Server#token>`.
26
+
27
+
Each of these functions should:
28
+
29
+
- Create :doc:`Request </api/request>` and :doc:`Response </api/response>` objects from their framework-specific counterparts.
30
+
31
+
- Call the original function.
32
+
33
+
- Copy all fields from the :doc:`Response </api/response>` back to the framework-specific request object and send it.
34
+
35
+
Adapters should preserve functionality provided by *oauth2-server* but are free to add additional features that make sense for the respective HTTP server framework.
Copy file name to clipboardExpand all lines: docs/docs/getting-started.rst
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ oauth2-server_ is available via npm_.
16
16
17
17
$ npm install oauth2-server
18
18
19
-
.. note:: The *oauth2-server* module is framework-agnostic but there are several officially supported wrappers available for popular HTTP server frameworks such as Express_ and Koa_. If you're using one of those frameworks it is strongly recommended to use the respective wrapper module instead of rolling your own.
19
+
.. note:: The *oauth2-server* module is framework-agnostic but there are several officially supported adapters available for popular HTTP server frameworks such as Express_ and Koa_. If you're using one of those frameworks it is strongly recommended to use the respective adapter module instead of rolling your own.
0 commit comments