INACTIVE - http://mzl.la/ghe-archive - (EXPERIMENTAL) The server component of a product that remembers your passwords for you.
Перейти к файлу
Ryan Kelly 7cc1f1a72f
Merge pull request #78 from Mozilla-GitHub-Standards/master
Add Mozilla Code of Conduct
2019-03-29 06:44:49 +11:00
bin fix config for docs 2013-01-23 15:06:05 -08:00
client removed jetpack specific stuff from client.js 2013-01-25 12:35:24 -08:00
etc upgrade hapi and hawk; have PUT payload return timestamp 2013-01-17 11:13:29 -08:00
lib ensure request params are marked required 2013-01-29 13:01:12 -08:00
public add inline install script 2013-01-02 13:39:50 -08:00
scripts avoid undefined emails doc 2012-12-19 12:13:07 -08:00
test account creation now takes an initial payload 2013-01-23 16:17:58 -08:00
views add inline install script 2013-01-02 13:39:50 -08:00
.awsbox.json configure database for production 2012-12-12 11:22:56 -08:00
.gitignore deploy, cleanup, and serve new extension updates 2012-11-20 14:54:52 -08:00
.travis.yml add irc notifications for travis 2012-11-06 13:57:48 -07:00
CODE_OF_CONDUCT.md Add Mozilla Code of Conduct file 2019-03-27 21:08:52 -07:00
README.md initial docs on client api 2013-01-11 15:59:44 -08:00
grunt.js add hybrid of sandstone and Mozilla labs theme 2012-11-19 17:21:11 -08:00
package.json make sure travis has enough time for crypto 2013-01-29 13:01:36 -08:00

README.md

Build Status

What is this?

This is a highly EXPERIMENTAL server to support Gombot, a tool that securely remembers your passwords for you.

Deploy site changes

If you're on the Identity team, simply clone this repo then add a new remote repo:

git remote add tobmog app@dev.tobmog.org:git

and push your changes:

git push tobmog HEAD:master

and you're done.

Update addons

Push code to the gombot-chrome repo and the extension will be built and hosted on dev.tobmog.org for immediate download.

Client API V1

The client can be used from the browser or node.js.

GombotClient(url, options)

The constructor for new clients.

  • url: URL for the gombot server API endpoint, e.g. http://gombot.org/api.
  • options: this is useful for initializing a client with credentials, rather than signing in later
    • user: email address of user for auth'd requests
    • keys: and object with authKey, aesKey, and hmacKey keys of the corresponding user

Example:

var client = new GombotClient('http://gombot.org/api');

Callbacks

Every API call takes a callback with a common signature. callback should be a function with signature function (err, result) { }. result will have a common success property across all API calls that indicates if the operation was successful or not (true or false). Additional result properties are described where appropriate.

client.context([args], [callback])

This will retrieve entropy from the server and seed the crypto library for future computations. It should be called early on before encrypt/decrypt methods are used.

client.account(args, [callback]);

Creates a new account and generates crypto keys.

args: object with properties:

  • email: user's email address
  • pass: plaintext master password
  • newsletter: boolean indicating whether or not the user wishes to receive future email updates

After successful account creation, client will have cryptographic keys stored in client.keys in order to make authorized API calls later on. client.email stores the email address of the account.

client.status(args, [callback])

Makes an authorized API request, so client.keys should have the correct keys for the client.email account.

client.signIn(args, [callback])

args: object with properties:

  • email: user's email address
  • pass: plaintext master password

After successful sign in, client will have cryptographic keys stored in client.keys in order to make authorized API calls later on. client.email stores the email address of the account.

client.storePayload(args, [callback])

Makes an authorized API request to store new user credentials args: object with properties:

  • payload: plaintext credentials; encrypted by the client before sending

client.getPayload(args, [callback])

Makes an authorized API request to retrieve new user credentials

args is empty. callback should be a function with signature function (err, result) { }. result will have three keys:

  • success: the standard success/failure indicator
  • payload: the decrypted payload
  • updated: the timestamp of when the payload was last updated

client.getTimestamp(args, [callback])

Makes an authorized API request to retrieve the timestamp of when the user's payload was last updated

args is empty. callback should be a function with signature function (err, result) { }. result will have three keys:

  • success: the standard success/failure indicator
  • updated: the timestamp of when the payload was last updated