欢迎大家赞助一杯啤酒🍺 我们准备了下酒菜:Formal mathematics/Isabelle/ML, Formal verification/Coq/ACL2/Agda, C++/Lisp/Haskell
BrowserID
来自开放百科 - 灰狐
				
								
				(版本间的差异)
				
																
				
				
								
 (以内容'BrowserID  ==链接== *https://browserid.org  Category:mozilla'创建新页面)  | 
			小 (→链接)  | 
			||
| (未显示1个用户的18个中间版本) | |||
| 第1行: | 第1行: | ||
BrowserID  | BrowserID  | ||
| + | |||
| + | [[文件:browserid-persona-chain-of-trust.png]]  | ||
| + | ==介绍==  | ||
| + | |||
| + | ==协议==  | ||
| + | [https://github.com/mozilla/id-specs BrowserID协议规范]  | ||
| + | |||
| + | ==安装==  | ||
| + | ===Debian===  | ||
| + | |||
| + | ===Mac OS X===  | ||
| + | 确认已安装:  | ||
| + | *node.js (>= 0.6.17)  | ||
| + | *libgmp3  | ||
| + | *g++  | ||
| + | |||
| + |  git clone https://github.com/mozilla/browserid.git  | ||
| + |  cd browserid  | ||
| + |  npm install  | ||
| + |  npm start  | ||
| + | 可能出现:static (20153): error: can't read public key, exiting: Error: ENOENT, no such file or directory '/User/huihoo/browserid/var/root.cert'  | ||
| + |  example (20145): using browserid server at http://127.0.0.1:10002  | ||
| + |  example (20145): running on http://127.0.0.1:10001  | ||
| + |  example_primary (20146): using browserid server at http://127.0.0.1:10002  | ||
| + |  example_primary (20146): running on http://127.0.0.1:10005  | ||
| + |  proxy (20148): running on http://127.0.0.1:10006  | ||
| + |  verifier (20140): info: running on http://127.0.0.1:10000  | ||
| + |  keysigner (20141): info: running on http://127.0.0.1:10003  | ||
| + | |||
| + | ==代码==  | ||
| + | 数据库部分  | ||
| + |  const schemas = [  | ||
| + |   "CREATE TABLE IF NOT EXISTS user (" +  | ||
| + |     "id BIGINT AUTO_INCREMENT PRIMARY KEY," +  | ||
| + |     "passwd CHAR(64)" +  | ||
| + |     ") ENGINE=InnoDB;",  | ||
| + | |||
| + |   "CREATE TABLE IF NOT EXISTS email (" +  | ||
| + |     "id BIGINT AUTO_INCREMENT PRIMARY KEY," +  | ||
| + |     "user BIGINT NOT NULL," +  | ||
| + |     "address VARCHAR(255) UNIQUE NOT NULL," +  | ||
| + |     "type ENUM('secondary', 'primary') DEFAULT 'secondary' NOT NULL," +  | ||
| + |     "FOREIGN KEY user_fkey (user) REFERENCES user(id)" +  | ||
| + |     ") ENGINE=InnoDB;",  | ||
| + | |||
| + |   "CREATE TABLE IF NOT EXISTS staged (" +  | ||
| + |     "id BIGINT AUTO_INCREMENT PRIMARY KEY," +  | ||
| + |     "secret CHAR(48) UNIQUE NOT NULL," +  | ||
| + |     "new_acct BOOL NOT NULL," +  | ||
| + |     "existing_user BIGINT," +  | ||
| + |     "email VARCHAR(255) UNIQUE NOT NULL," +  | ||
| + |     "passwd CHAR(64)," +  | ||
| + |     "ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL," +  | ||
| + |     "FOREIGN KEY existing_user_fkey (existing_user) REFERENCES user(id)" +  | ||
| + |     ") ENGINE=InnoDB;",  | ||
| + |  ];  | ||
| + | |||
| + | ==Ruby==  | ||
| + | |||
| + | ==PostgreSQL==  | ||
| + | |||
| + | ==MySQL==  | ||
| + | |||
| + | |||
| + | ==图集==  | ||
| + | <gallery widths=100px heights=100px perrow=6>  | ||
| + | Image:browserid-assertion-generation-and-verify.png  | ||
| + | Image:browserid-id-provisioning-secondary.png  | ||
| + | Image:browserid-user-certificate-provisioning.png  | ||
| + | Image:browserid-dialog-modules-controllers.png  | ||
| + | Image:browserid-modules-actions-state-machine-hub.png  | ||
| + | Image:browserid-user-flow.png  | ||
| + | Image:browserid-user-flow-higher-level.png  | ||
| + | </gallery>  | ||
==链接==  | ==链接==  | ||
*https://browserid.org  | *https://browserid.org  | ||
| + | *[https://github.com/mozilla/browserid BrowserID @ GitHub]  | ||
| + | *[https://github.com/mozilla/browserid/wiki/BrowserID-Libraries BrowserID Libraries]  | ||
| + | *[http://identity.mozilla.com/ Identity @ Mozilla]  | ||
| − | [[  | + | [[category:identity]]  | 
| + | [[category:mozilla]]  | ||
| + | [[category:JavaScript]]  | ||
| + | [[category:node.js]]  | ||
2013年5月19日 (日) 00:59的最后版本
BrowserID
目录 | 
[编辑] 介绍
[编辑] 协议
[编辑] 安装
[编辑] Debian
[编辑] Mac OS X
确认已安装:
- node.js (>= 0.6.17)
 - libgmp3
 - g++
 
git clone https://github.com/mozilla/browserid.git cd browserid npm install npm start
可能出现:static (20153): error: can't read public key, exiting: Error: ENOENT, no such file or directory '/User/huihoo/browserid/var/root.cert'
example (20145): using browserid server at http://127.0.0.1:10002 example (20145): running on http://127.0.0.1:10001 example_primary (20146): using browserid server at http://127.0.0.1:10002 example_primary (20146): running on http://127.0.0.1:10005 proxy (20148): running on http://127.0.0.1:10006 verifier (20140): info: running on http://127.0.0.1:10000 keysigner (20141): info: running on http://127.0.0.1:10003
[编辑] 代码
数据库部分
const schemas = [
 "CREATE TABLE IF NOT EXISTS user (" +
   "id BIGINT AUTO_INCREMENT PRIMARY KEY," +
   "passwd CHAR(64)" +
   ") ENGINE=InnoDB;",
 "CREATE TABLE IF NOT EXISTS email (" +
   "id BIGINT AUTO_INCREMENT PRIMARY KEY," +
   "user BIGINT NOT NULL," +
   "address VARCHAR(255) UNIQUE NOT NULL," +
   "type ENUM('secondary', 'primary') DEFAULT 'secondary' NOT NULL," +
   "FOREIGN KEY user_fkey (user) REFERENCES user(id)" +
   ") ENGINE=InnoDB;",
 "CREATE TABLE IF NOT EXISTS staged (" +
   "id BIGINT AUTO_INCREMENT PRIMARY KEY," +
   "secret CHAR(48) UNIQUE NOT NULL," +
   "new_acct BOOL NOT NULL," +
   "existing_user BIGINT," +
   "email VARCHAR(255) UNIQUE NOT NULL," +
   "passwd CHAR(64)," +
   "ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL," +
   "FOREIGN KEY existing_user_fkey (existing_user) REFERENCES user(id)" +
   ") ENGINE=InnoDB;",
];
[编辑] Ruby
[编辑] PostgreSQL
[编辑] MySQL
[编辑] 图集
[编辑] 链接
	分享您的观点
			
			
			
			
			
				
								
				
								
			