-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #72 from planet-nine-app/issue-54/contributing-gui…
…delines-and-cleanup documentation
- Loading branch information
Showing
12 changed files
with
137 additions
and
2 deletions.
There are no files selected for viewing
File renamed without changes.
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,41 @@ | ||
# How to contribute | ||
|
||
I'm of the opinion that contributing should be as easy and inviting as possible. | ||
This guide is written with that premise in mind. | ||
|
||
The discussion about Sessionless takes place on Discord in the [Open Source Force][osf] server. | ||
Follow that link to get an invite. | ||
|
||
Before contributing, I recommend you read through the READMEs and supporting documentation thoroughly. | ||
|
||
## Testing | ||
|
||
New language implementations should include an example server, which is added to the color tests of the language CLIs (of which only javascript and Rust are currently setup for new languages). | ||
|
||
New client implementations should be testable against any of the example servers, and should include an example with some simple UI for doing that test. | ||
|
||
Unit tests for implementations are encouraged, but not required since testing an implementation against itself can give false positives.[^1] | ||
|
||
## Submitting changes | ||
|
||
Please send a with a clear list of what you've done (read more about [pull requests](http://help.github.com/pull-requests/)). | ||
Feel free to give us a heads up on Discord of your impressive contribution. | ||
|
||
## Coding conventions | ||
|
||
The Sessionless repo is multi-language, and multi-platform so there are no global conventions. | ||
Still some concepts are common between implementations. | ||
|
||
* Sessionless is small (only 6-8 functions), and should be as flat as possible. | ||
Try to avoid indirection, and unecessary abstraction. | ||
|
||
* Your implementation should match the words of the names of functions, but adopt other conventions of your language, i.e. snake_casing vs camelCasing. | ||
|
||
* If your implementation errors, it should log a clear message about why it is erroring. | ||
|
||
Thank you for your interest in Sessionless! | ||
We look forward to seeing what you come up with. | ||
|
||
Planet Nine & Open Source Force | ||
|
||
[osf]: https://opensourceforce.net |
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
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,26 @@ | ||
# Sessionless | ||
|
||
This folder holds the JavaScript, and TypeScript implementation of Sessionless. | ||
There are node, and React Native Expo versions currently. | ||
The node version should work everywhere you want it to, there's just a need for platform-specific implementations due to how secure things are stored. | ||
|
||
## Usage | ||
|
||
### Installation | ||
|
||
Currently these are available only in npm, though other registries should come soon. | ||
So a standard `npm i sessionless-node` should work for you. | ||
|
||
### Methods | ||
|
||
Function | What it does | ||
:--------|:------------| | ||
`generateKeys(saveKeys?: keys => void, getKeys?: () => Keys)` | Generates a private/public keypair and stores it in the platform's secure storage. Takes an optional `saveKeys` function for platforms that don't have clear-cut secure storage. | ||
`getKeys()` | Gets keys from secure storage. | ||
`sign(message: String)` | Signs a message with the user's private key. | ||
`verifySignature(message: String, signature: String, publicKey: String)` | Verifies a given signature with a public key. | ||
`generateUUID()` | Creates a unique UUID for a user. | ||
`associateKeys(associationMessage: String, primarySignature: String, secondarySignature: String, publicKey: String)` | Associates a secondary's key with the user's primary key. | ||
`revokeKey(message: String, signature: String, publicKey: String)` | Revokes a gateway's key from the user. | ||
|
||
|
Binary file not shown.
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Sessionless | ||
|
||
This folder holds the Python implementation of Sessionless. | ||
There is a Flask example, and a cli as well. | ||
|
||
## Usage | ||
|
||
### Installation | ||
|
||
Currently available in pip. | ||
`pip install sessionless` | ||
|
||
### Methods | ||
|
||
* NOTE * These are pseudocode methods. | ||
Please check documentation in Pip for the actual method signatures. | ||
|
||
Function | What it does | ||
:--------|:------------| | ||
`generateKeys(saveKeys?: keys => void, getKeys?: () => Keys)` | Generates a private/public keypair and stores it in the platform's secure storage. Takes an optional `saveKeys` function for platforms that don't have clear-cut secure storage. | ||
`getKeys()` | Gets keys from secure storage. | ||
`sign(message: String)` | Signs a message with the user's private key. | ||
`verifySignature(message: String, signature: String, publicKey: String)` | Verifies a given signature with a public key. | ||
`generateUUID()` | Creates a unique UUID for a user. | ||
`associateKeys(associationMessage: String, primarySignature: String, secondarySignature: String, publicKey: String)` | Associates a secondary's key with the user's primary key. | ||
`revokeKey(message: String, signature: String, publicKey: String)` | Revokes a gateway's key from the user. | ||
|
||
|
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Sessionless | ||
|
||
This folder holds the Rust implementation of Sessionless. | ||
There is a hyper example, and a cli as well. | ||
|
||
## Usage | ||
|
||
### Installation | ||
|
||
Currently available as a crate. | ||
`cargo add sessionless` | ||
|
||
### Methods | ||
|
||
| Function | What it does | | ||
|:------------------------------------------------------------------------------------------------------|:----------------------------------------------------------| | ||
| `Sessionless::new()` | Generates new context object with private/public keypair. | | ||
| `Sessionless::public_key(&self)` | Returns the public key. | | ||
| `Sessionless::private_key(&self)` | Returns the private key. | | ||
| `Sessionless::sign(&self, message: impl AsRef<[u8]>)` | Signs a message with the user's private key. | | ||
| `Sessionless::verify(&self, message: impl AsRef<[u8]>, publicKey: &PublicKey, signature: &Signature)` | Verifies a given signature with a public key. | | ||
| `Sessionless::generate_uuid()` | Creates a unique UUID for a user. | |
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