@@ -88,6 +88,17 @@ val error_token_type_to_str :
8888
8989(* * {5 Parameters types for the different services. } *)
9090
91+ (* * Parameters for the authorization service. This service must be registered on
92+ the server.
93+
94+ The parameters are (in order):
95+ - the response type. For the moment, only the value ["code"] is
96+ supported.
97+ - the client ID.
98+ - the redirect URI.
99+ - the scope as a space separated list.
100+ - the state.
101+ *)
91102val param_authorization_code :
92103 (
93104 Eliom_service .get ,
@@ -105,6 +116,14 @@ val param_authorization_code :
105116 )
106117 Eliom_service .meth
107118
119+ (* * Parameters for the authorization code response service. This service must be
120+ registered on the client and use by the server to send the code in case
121+ of success.
122+
123+ The parameters are (in order):
124+ - the code.
125+ - the state.
126+ *)
108127val param_authorization_code_response :
109128 (
110129 Eliom_service .get ,
@@ -118,6 +137,16 @@ val param_authorization_code_response :
118137 )
119138 Eliom_service .meth
120139
140+ (* * Parameters for the authorization code response service. This service must be
141+ registered on the client and use by the server to send the response in case
142+ of error.
143+
144+ The parameters are (in order):
145+ - the error.
146+ - an (optional) error description
147+ - an (optional) error URI to describe the error.
148+ - the state.
149+ *)
121150val param_authorization_code_response_error :
122151 (
123152 Eliom_service .get ,
@@ -133,6 +162,17 @@ val param_authorization_code_response_error :
133162 )
134163 Eliom_service .meth
135164
165+ (* * Parameters for the token service. This service must be registered on the
166+ server.
167+
168+ The parameters are (in order):
169+ - the grant type. For the moment, only the value ["authorization_code"] is
170+ supported.
171+ - the code.
172+ - the redirect URI.
173+ - the state.
174+ - the client ID.
175+ *)
136176val param_access_token :
137177 (
138178 Eliom_service .post ,
@@ -152,6 +192,13 @@ val param_access_token :
152192
153193(* * {6 MISC functions. } *)
154194
195+ (* * [update_list_timer seconds fn_check fn_timeout list] creates a Lwt timeout
196+ each [seconds] (see <<a_api project="lwt" | Lwt_timeout.create>> and <<a_api
197+ project="lwt" | Lwt_timeout.start>>). After this timeout, [fn_timeout] is
198+ executed on each element of [list] for which [fn_check] is [true].
199+
200+ This function is used to remove saved tokens when they are expired.
201+ *)
155202val update_list_timer :
156203 int ->
157204 ('a -> bool ) ->
@@ -160,10 +207,19 @@ val update_list_timer :
160207 unit ->
161208 unit
162209
210+ (* * [generate_random_string length] generates an alphanumeric string of length
211+ [length].
212+ *)
163213val generate_random_string :
164214 int ->
165215 string
166216
217+ (* * [prefix_and_path_of_t url] splits [url] in a couple [(prefix, path)] where
218+ [prefix] is ["http(s)://host:port"] and [path] is the path as [string list]
219+
220+ Example: [prefix_and_path_of_t "http://ocsigen.org:80/tuto/manual"]
221+ returns [("http://ocsigen.org:80", ["tuto", "manual"])].
222+ *)
167223val prefix_and_path_of_url :
168224 Ocsigen_lib.Url .t ->
169225 string * string list
0 commit comments