-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e90bfa8
commit 38942d3
Showing
62 changed files
with
10,114 additions
and
36,533 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,43 @@ | ||
## Code examples | ||
# Code examples | ||
|
||
### How to integrate 3Bot Connect app as decentralized login mechanism | ||
## How to integrate 3Bot Connect app as decentralized login mechanism | ||
|
||
#### Python | ||
### Python | ||
|
||
https://github.com/threefoldtech/Threefold-Circles/blob/production/taiga/threebot/api.py#L42 | ||
<https://github.com/threefoldtech/Threefold-Circles/blob/production/taiga/threebot/api.py#L42> | ||
|
||
#### php | ||
### php | ||
|
||
https://github.com/freeflowpages/freeflow-threebot-login/blob/master/authclient/ThreebotAuth.php#L26 | ||
<https://github.com/freeflowpages/freeflow-threebot-login/blob/master/authclient/ThreebotAuth.php#L26> | ||
|
||
https://github.com/freeflowpages/freeflow-threebot-login/blob/master/controllers/user/UserController.php#L43 | ||
<https://github.com/freeflowpages/freeflow-threebot-login/blob/master/controllers/user/UserController.php#L43> | ||
|
||
#### Crystal lang | ||
### Crystal lang | ||
|
||
https://github.com/crystaluniverse/kemal-threebot | ||
<https://github.com/crystaluniverse/kemal-threebot> | ||
|
||
#### Go | ||
### Go | ||
|
||
See lines 137-179 as well as SignIn and VerifyCallback function in : | ||
https://github.com/threefoldtech/tf-gitea/blob/b63f8429483290e96fadbc7a9ca0bf9ff9c1232a/routers/user/auth.go | ||
See lines 137-179 as well as SignIn and VerifyCallback function in : | ||
<https://github.com/threefoldtech/tf-gitea/blob/b63f8429483290e96fadbc7a9ca0bf9ff9c1232a/routers/user/auth.go> | ||
|
||
#### Python extra tooling | ||
### Python extra tooling | ||
|
||
##### Proxy for Redirection | ||
#### Proxy for Redirection | ||
|
||
A proxy written in python where u can talk to, using any language using http client. | ||
It can help you for url redirection for 3bot connect. You can define the call back in your application at any point, then get then same parameters sent by 3bot connect to your endpoint to this proxy to decrypt data for you. | ||
So you can verify whether the user has logged in, get his 3Bot name, e-mail etc. | ||
A proxy written in python where u can talk to, using any language using http client. | ||
It can help you for url redirection for 3bot connect. You can define the call back in your application at any point, then get then same parameters sent by 3bot connect to your endpoint to this proxy to decrypt data for you. | ||
So you can verify whether the user has logged in, get his 3Bot name, e-mail etc. | ||
|
||
https://github.com/threefoldtech/threefold-forums/tree/master/3bot | ||
<https://github.com/threefoldtech/threefold-forums/tree/master/3bot> | ||
|
||
##### Library | ||
#### Library | ||
|
||
pyncal | ||
|
||
Keys can be generated using | ||
` | ||
Keys can be generated using | ||
|
||
```bash | ||
import nacl.signing | ||
nacl.signing.SigningKey.generate().encode(nacl.encoding.Base64Encoder) | ||
` | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
include: package:flutter_lints/flutter.yaml | ||
|
||
linter: | ||
rules: | ||
prefer_const_constructors: true | ||
prefer_final_fields: true | ||
use_key_in_widget_constructors: true | ||
prefer_const_literals_to_create_immutables: true | ||
prefer_const_constructors_in_immutables: true | ||
avoid_print: true | ||
prefer_single_quotes: true |
Oops, something went wrong.