acebase-server 1.7.0 → 1.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,65 @@
1
+ /oauth2/{dbname}/refresh:
2
+ get:
3
+ tags:
4
+ - auth
5
+ - oauth2
6
+ summary: Refreshes an OAuth2 access token
7
+ description: Refreshes an OAuth2 provider's access token using the refresh token given by the auth provider at signin.
8
+ parameters:
9
+ - name: dbname
10
+ in: path
11
+ description: name of the database
12
+ required: true
13
+ schema:
14
+ type: string
15
+ example: mydb
16
+ - name: provider
17
+ in: query
18
+ description: External OAuth2 provider name
19
+ required: true
20
+ schema:
21
+ type: string
22
+ example: facebook
23
+ - name: refresh_token
24
+ in: query
25
+ description: A refresh token from the OAuth2 signin result
26
+ required: true
27
+ schema:
28
+ type: string
29
+ example: erfiyh3rfig3fuyb3rjfg3u7refc...
30
+ responses:
31
+ 200:
32
+ description: Returns a JSON object containing new access and refresh tokens and expiry information
33
+ content:
34
+ 'application/json':
35
+ schema:
36
+ type: object
37
+ properties:
38
+ name:
39
+ type: string
40
+ description: Provider name
41
+ example: facebook
42
+ access_token:
43
+ type: string
44
+ description: New access token
45
+ example: fkw3ygfi74g25foli2n4vo7h2vto72g4...
46
+ refresh_token:
47
+ type: string
48
+ description: New refresh token
49
+ example: 32lo548jnl34tv73h4l5nbb35ithn3jt...
50
+ expires_in:
51
+ type: integer
52
+ description: Amount of seconds these tokens remain valid. A new refresh will have to be done before they expire.
53
+ example: 3600
54
+ example:
55
+ name: facebook
56
+ access_token: fkw3ygfi74g25foli2n4vo7h2vto72g4...
57
+ refresh_token: 32lo548jnl34tv73h4l5nbb35ithn3jt...
58
+ expires_in: 3600
59
+ 500:
60
+ description: If anything goes wrong on the server, it returns the actual error text in plain text
61
+ content:
62
+ 'text/plain':
63
+ schema:
64
+ type: string
65
+ example: Some error text
@@ -0,0 +1,66 @@
1
+ /oauth2/{dbname}/signin:
2
+ get:
3
+ tags:
4
+ - auth
5
+ - oauth2
6
+ summary: Finishes an OAuth2 flow
7
+ description: Finishes a 3rd party OAuth2 authentication flow. This is the url you have to add to your oAuth2 provider's allowed callback urls; the auth provider will redirect the login result to this address so AceBase auth can handle the signin and then redirect the user to the callbackUrl you provided in the oauth2 init endpoint.
8
+ parameters:
9
+ - name: dbname
10
+ in: path
11
+ description: name of the database
12
+ required: true
13
+ schema:
14
+ type: string
15
+ example: mydb
16
+ - name: state
17
+ in: query
18
+ description: info about the initial oauth2 request (generated by AceBase)
19
+ required: true
20
+ schema:
21
+ type: string
22
+ example: sefwerg44tgwefvq3g4rbqewrgbqebwdfbwsergq34t...
23
+ - name: code
24
+ in: query
25
+ required: false
26
+ description: If signin is successful, contains the authorization code AceBase will use to request access and refresh tokens from the OAuth2 provider.
27
+ schema:
28
+ type: string
29
+ example: erfuihqrf7g3rfgh3rifhwre8f73efuh3eifh...
30
+ - name: error
31
+ in: query
32
+ description: If an error occurred, the error code
33
+ required: false
34
+ schema:
35
+ type: string
36
+ example: canceled
37
+ - name: error_reason
38
+ in: query
39
+ description: If an error occurred, the error reason
40
+ required: false
41
+ schema:
42
+ type: string
43
+ example: user_canceled
44
+ - name: error_description
45
+ in: query
46
+ description: If an error occurred, the error description
47
+ required: false
48
+ schema:
49
+ type: string
50
+ example: The user canceled the auth request
51
+ responses:
52
+ 200:
53
+ description: Redirects the user to the callbackUrl you provided in the init endpoint
54
+ headers:
55
+ Location:
56
+ schema:
57
+ type: string
58
+ format: url
59
+ example: https://my.website.com/oauth2/callback?result=er32f32g2erv2erv23g315g..
60
+ 500:
61
+ description: If anything goes wrong on the server, it returns the actual error text in plain text
62
+ content:
63
+ 'text/plain':
64
+ schema:
65
+ type: string
66
+ example: Some error text
@@ -263,7 +263,7 @@ M.AutoInit();
263
263
  </script>
264
264
 
265
265
  <!-- AceBase client js -->
266
- <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/acebase-client@1.7.1/dist/browser.min.js"></script>
266
+ <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/acebase-client@1.11.0/dist/browser.min.js"></script>
267
267
  <!-- <script type="text/javascript" src="acebase-client-browser.min.js"></script> -->
268
268
 
269
269
  <!-- AceBase Webmanager js -->