mirror of https://github.com/apibillme/broker
Compare commits
3 Commits
34848f7860
...
b413e1e859
Author | SHA1 | Date |
---|---|---|
Bevan Hunt | b413e1e859 | |
Bevan Hunt | a5cee3c7de | |
Bevan Hunt | 9fa5a83748 |
10
CHANGELOG.md
10
CHANGELOG.md
|
@ -4,6 +4,16 @@ All notable changes to this project will be documented in this file.
|
|||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [13.0.2] - 2021-04-10
|
||||
|
||||
### Updated
|
||||
- Updated README
|
||||
|
||||
## [13.0.1] - 2021-04-10
|
||||
|
||||
### Updated
|
||||
- Updated README
|
||||
|
||||
## [13.0.0] - 2021-04-08
|
||||
|
||||
### Added
|
||||
|
|
|
@ -521,7 +521,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "broker"
|
||||
version = "13.0.0"
|
||||
version = "13.0.2"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-std",
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
[package]
|
||||
name = "broker"
|
||||
version = "13.0.0"
|
||||
version = "13.0.2"
|
||||
authors = ["Bevan Hunt <bevan@bevanhunt.com>"]
|
||||
edition = "2018"
|
||||
license = "MIT"
|
||||
keywords = ["sse", "api", "baas", "broker", "real-time"]
|
||||
keywords = ["sse", "identity", "baas", "broker", "real-time"]
|
||||
description = "Real-time BaaS (Backend as a Service)"
|
||||
repository = "https://github.com/apibillme/broker"
|
||||
categories = ["web-programming::http-server", "database-implementations", "authentication"]
|
||||
|
|
21
README.md
21
README.md
|
@ -12,6 +12,10 @@ Broker is born from the need that rather than building a complex REST API with w
|
|||
|
||||
Broker follows an insert-only/publish/subscribe paradigm rather than a REST CRUD paradigm.
|
||||
|
||||
Broker also provides full identity services using JWT, HTTP Basic, Two Factor, and TOTP.
|
||||
|
||||
Broker is a competitor to [Firebase](https://firebase.google.com/), [Parse Server](https://github.com/parse-community/parse-server), [Auth0](https://auth0.com), [AWS Cognito](https://aws.amazon.com/cognito/), [AWS SimpleDB](https://aws.amazon.com/simpledb/), and [AWS SNS](https://aws.amazon.com/sns/).
|
||||
|
||||
### Features
|
||||
|
||||
* Very performant with almost no CPU and memory usage
|
||||
|
@ -49,17 +53,6 @@ The side-effect of this system is that the latest event is the schema. This is p
|
|||
* [React Hook Form](https://react-hook-form.com/) - Best form library for React
|
||||
* [React Debounce Input](https://www.npmjs.com/package/react-debounce-input) - React input for Real-time Submission (Edit in Place forms)
|
||||
|
||||
### Broker FAQ
|
||||
* Why compete against Parse Server, Auth0, and Firebase?
|
||||
|
||||
* [Firebase](https://firebase.google.com/) is not open-source, is not free, and has complicated pricing.
|
||||
* [Parse Server](https://github.com/parse-community/parse-server) doesn't have real-time features and is about 30,000 LOC of JS.
|
||||
* [Auth0](https://auth0.com) is not open-source, is not free, and is expensive.
|
||||
|
||||
* Will broker work with mobile apps?
|
||||
|
||||
Yes with React Native. There may be native 3rd party libraries for SSE that work. In the future official libraries may be made available for native platforms.
|
||||
|
||||
### Use
|
||||
|
||||
#### Step 1 - create a user
|
||||
|
@ -103,7 +96,9 @@ POST /login
|
|||
```
|
||||
- `totp` is required if two factor is enabled for the user - if not the field can be omitted
|
||||
|
||||
will return
|
||||
will return: `200` or `500` or `400` or `401`
|
||||
|
||||
200 - will return a JWT
|
||||
```json
|
||||
{
|
||||
"jwt": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2MTc2NzQ5MTUsImlhdCI6MTYxNzU4ODUxNSwiaXNzIjoiRGlzcGF0Y2hlciIsInN1YiI6ImZvbyJ9.OwiaZJcFUC_B0CA0ffRZVTWKRf5_vQ7vt5USNJEeKRE"
|
||||
|
@ -112,6 +107,8 @@ will return
|
|||
- note: `iat` is the issue time, `exp` is the expiry time, `sub` is the username, `iss` is `Broker`, while `aud` is the user scopes joined with a comma like in this example `news:get,news:post`
|
||||
- note: if you need to debug your JWT then visit [jwt.io](https://jwt.io)
|
||||
|
||||
|
||||
|
||||
#### Step 3 - connect to SSE
|
||||
|
||||
```html
|
||||
|
|
Loading…
Reference in New Issue