欢迎大家赞助一杯啤酒🍺 我们准备了下酒菜:Formal mathematics/Isabelle/ML, Formal verification/Coq/ACL2/Agda, C++/Lisp/Haskell
BrowserID
来自开放百科 - 灰狐
				
								
				(版本间的差异)
				
																
				
				
								
小 (→代码)  | 
			小 (→安装)  | 
			||
| 第14行: | 第14行: | ||
  npm install  |   npm install  | ||
  npm start  |   npm start  | ||
| + | 可能出现:static (20153): error: can't read public key, exiting: Error: ENOENT, no such file or directory '/User/huihoo/browserid/var/root.cert'  | ||
  http://127.0.0.1:10001  |   http://127.0.0.1:10001  | ||
| + | |||
==代码==  | ==代码==  | ||
数据库部分  | 数据库部分  | ||
2012年9月4日 (二) 08:53的版本
BrowserID
目录 | 
安装
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'
http://127.0.0.1:10001
代码
数据库部分
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;",
];
图集
链接
	分享您的观点
			
			
			
			
			
				
								
				
								
			