Commit Graph

29 Commits

Author SHA1 Message Date
boreq ab664aafc3 Add a JSON endpoint for generating invites
When running in open mode invites can be freely generated by accessing
/create-invite. This displays an HTML page which creates and displays an
invite to the user.

This commit adds an additional way of creating invites in open mode. A
POST request can be sent to the same /create-invite endpoint with the
Accept header set to application/json. This returns a JSON response
which contains an invite url.

The purpose of this change is to make automatic invite generation easier
in SSB clients.
2022-12-13 19:15:11 +01:00
decentral1se 00a1452cfc
Migrate to ssbc urls (#336)
* fix: ssbc urls

Closes https://github.com/ssbc/go-ssb-room/issues/332

* fix: go-ssb-refs API changes

* test: go-ssb-refs API changes

Co-authored-by: decentral1se <cellarspoon@riseup.net>
Co-authored-by: André Staltz <andre@staltz.com>
2022-11-07 11:18:13 +02:00
Andre Staltz 3c6831d39a refactor common util StringifySSBURI 2021-11-23 09:20:08 -03:00
Andre Staltz 2d722f2098 unbreak TestInviteShowAcceptForm 2021-11-23 09:20:08 -03:00
Andre Staltz 8c9413d55d android intent uri does not require package field 2021-11-23 09:20:08 -03:00
Andre Staltz 642022cb0a fix support for SSB URIs on Android Chrome 2021-11-23 09:20:08 -03:00
Henry a249fd8bee fix SPDX headers and add reuse API badge 2021-10-08 14:39:31 +02:00
Henry 4d3610e2fb prepare v2 release 2021-05-31 14:51:05 +02:00
Henry 3e53570638 dependency updates
* use LICENSEd version of nocomment
* use forked kitlog
* cleanup of various dependencies
2021-05-25 12:40:00 +02:00
Henry 81c05a663d Support open invites (fixes #102) 2021-05-17 10:16:26 +02:00
User Cryptix fc5d3e440e add json response for invite facade (fixes #188) 2021-04-23 08:55:50 +02:00
Andre Staltz 3beb656b9c change join-room to claim-http-invite 2021-04-23 08:54:29 +02:00
Henry 3323a85226 refactor urlTo to use domain information for all links 2021-04-19 15:00:29 +02:00
Andre Staltz ed5a7f603e
fix invite QR code 2021-04-14 16:10:25 +03:00
cblgh 35d1d27c5f deny invite consumption for banned keys 2021-04-07 12:58:03 +02:00
cblgh 1b366dcf9f wip fix tests after new roomdb.RoomConfig interface added 2021-04-06 17:21:41 +02:00
cblgh faae7c0324 get started with privacy modes, parse -mode flag 2021-04-06 16:52:51 +02:00
André Staltz 106e961ce9
Fix web/handlers/invites.go
Co-authored-by: Henry <111202+cryptix@users.noreply.github.com>
2021-04-06 13:17:50 +03:00
André Staltz 4a066fd7e5
buildJoinRoomURI function returns template.URL
Co-authored-by: Henry <111202+cryptix@users.noreply.github.com>
2021-04-06 13:12:11 +03:00
Andre Staltz 08c8b0cced
style the join (claim invite) pages 2021-03-30 18:04:07 +03:00
Henry d1d108b9b7 Add support for invite consumption via JSON 2021-03-29 15:53:30 +02:00
Henry a180c74c38 begin sign-in with ssb
* sketch session store
* use session store and unify authentication handling
* sketch muxrpc handlers
2021-03-26 13:36:42 +01:00
Henry 8c48b4a2b8 web/handlers 2021-03-22 13:02:37 +01:00
Henry b9bcbb42ec alias JSON endpoint and testing 2021-03-16 08:49:58 +01:00
Henry 639bffeffa typo in web/handlers/invites.go
Co-authored-by: Alexander Cobleigh <cblgh@cblgh.org>
2021-03-11 09:32:17 +01:00
Henry 117cad48a7 rename admindb to roomdb 2021-03-10 16:44:46 +01:00
Henry b95c8de8be add room v1 "invite" until we have ssb-uri finalized 2021-03-10 09:35:54 +01:00
Henry fd21dfc60a Various fixes
* fix accept and consumed view
* Apply suggestions from Alex' code review
* define admin.Databases options struct
* structify database parameters of web/handlers
2021-03-10 09:34:36 +01:00
Henry 98468e93a5 Invite endpoints
* Add revoke and created templates
* Render invite accept with domain
* Flesh out accept page
2021-03-10 09:33:55 +01:00