jwtbutler 1.7.3 → 1.7.5

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.
Files changed (2) hide show
  1. package/README.md +8 -8
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -19,12 +19,12 @@ jwtbutler is a helper library for setting up a single sign on with jwt in a mult
19
19
 
20
20
  - a fully setup jwt auth server (like [simpleauth](https://github.com/vielhuber/simpleauth)) with the following routes
21
21
 
22
- | route | method | arguments | header | response |
23
- | -------- | ------ | -------------- | --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
24
- | /login | POST | email password | -- | `([ 'success' => true, 'message' => 'auth successful', 'public_message' => '...', 'data' => [ 'access_token' => '...', 'expires_in' => 3600, 'user_id' => 42 ] ], 200)` |
25
- | /refresh | POST | -- | Authorization: Bearer token | `([ 'success' => true, 'message' => 'auth successful', 'public_message' => '...', 'data' => [ 'access_token' => '...', 'expires_in' => 3600, 'user_id' => 42 ] ], 200)` |
26
- | /logout | POST | -- | Authorization: Bearer token | `([ 'success' => true, 'message' => 'logout successful', 'public_message' => '...' ], 200)` |
27
- | /check | POST | access_token | -- | `([ 'success' => true, 'message' => 'valid token', 'public_message' => '...', 'data' => [ 'expires_in' => 3600, 'user_id' => 42, 'client_id' => 7000000 ] ], 200)` |
22
+ | route | method | arguments | header | response |
23
+ | ------------- | ------ | -------------- | --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
24
+ | /auth/login | POST | email password | -- | `([ 'success' => true, 'message' => 'auth successful', 'public_message' => '...', 'data' => [ 'access_token' => '...', 'expires_in' => 3600, 'user_id' => 42 ] ], 200)` |
25
+ | /auth/refresh | POST | -- | Authorization: Bearer token | `([ 'success' => true, 'message' => 'auth successful', 'public_message' => '...', 'data' => [ 'access_token' => '...', 'expires_in' => 3600, 'user_id' => 42 ] ], 200)` |
26
+ | /auth/logout | POST | -- | Authorization: Bearer token | `([ 'success' => true, 'message' => 'logout successful', 'public_message' => '...' ], 200)` |
27
+ | /auth/check | POST | access_token | -- | `([ 'success' => true, 'message' => 'valid token', 'public_message' => '...', 'data' => [ 'expires_in' => 3600, 'user_id' => 42, 'client_id' => 7000000 ] ], 200)` |
28
28
 
29
29
  - 401 response code on bad authentication
30
30
 
@@ -50,7 +50,7 @@ now instantiate the object with the basic configuration:
50
50
 
51
51
  ```js
52
52
  const api = new jwtbutler({
53
- auth_server: 'https://example-auth-server.vielhuber.dev',
53
+ auth_server: 'https://example-auth-server.vielhuber.dev/auth',
54
54
  auth_login: 'email'
55
55
  });
56
56
  ```
@@ -248,7 +248,7 @@ RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]
248
248
 
249
249
  setup the following vhosts:
250
250
 
251
- - https://example-auth-server.vielhuber.dev => jwt auth server (like [simpleauth](https://github.com/vielhuber/simpleauth))
251
+ - https://example-auth-server.vielhuber.dev/auth => jwt auth server (like [simpleauth](https://github.com/vielhuber/simpleauth))
252
252
  - https://example-auth-page1.vielhuber.dev => \_tests/page1
253
253
  - https://example-auth-page2.vielhuber.dev => \_tests/page2
254
254
  - https://example-auth-page3.vielhuber.dev => \_tests/page3
package/package.json CHANGED
@@ -84,7 +84,7 @@
84
84
  },
85
85
  "devDependencies": {},
86
86
  "name": "jwtbutler",
87
- "version": "1.7.3",
87
+ "version": "1.7.5",
88
88
  "description": "",
89
89
  "main": "_js/_build/script.js",
90
90
  "files": [