update readme with new argument names
This commit is contained in:
		
							parent
							
								
									940938dd81
								
							
						
					
					
						commit
						e633d857fd
					
				
							
								
								
									
										18
									
								
								Readme.md
									
									
									
									
									
								
							
							
						
						
									
										18
									
								
								Readme.md
									
									
									
									
									
								
							| @ -18,8 +18,8 @@ var args = {}; | |||||||
| 
 | 
 | ||||||
| //.... some initial login code, that receives the TOTP / HTOP | //.... some initial login code, that receives the TOTP / HTOP | ||||||
| // token from the user | // token from the user | ||||||
| args.K = 'TOTP key for user... could be stored in DB'; | args.key = 'TOTP key for user... could be stored in DB'; | ||||||
| args.P = 'User supplied TOTP value'; | args.token = 'User supplied TOTP value'; | ||||||
| 
 | 
 | ||||||
| // Check TOTP is correct | // Check TOTP is correct | ||||||
| var login = notp.checkTOTP(args); | var login = notp.checkTOTP(args); | ||||||
| @ -72,8 +72,8 @@ console.log('Token valid, sync value is %s', login.delta); | |||||||
| 
 | 
 | ||||||
| ```javascript | ```javascript | ||||||
| var opt = { | var opt = { | ||||||
|     K : 'USER SPECIFIC KEY', // Should be ASCII string |     key : 'USER SPECIFIC KEY', // Should be ASCII string | ||||||
|     P : 'USER SUPPLIED PASSCODE' |     token : 'USER SUPPLIED PASSCODE' | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| var res = notp.checkHOTP(opt); | var res = notp.checkHOTP(opt); | ||||||
| @ -127,8 +127,8 @@ console.log('valid, counter is out of sync by %d steps', res.delta); | |||||||
| 
 | 
 | ||||||
| ```javascript | ```javascript | ||||||
| var opt = { | var opt = { | ||||||
|     K : 'USER SPECIFIC KEY', // Should be ASCII string |     key : 'USER SPECIFIC KEY', // Should be ASCII string | ||||||
|     P : 'USER SUPPLIED PASSCODE' |     token : 'USER SUPPLIED PASSCODE' | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| var res = notp.checkTOTP(opt); | var res = notp.checkTOTP(opt); | ||||||
| @ -160,8 +160,8 @@ console.log('valid, counter is out of sync by %d steps', res.delta); | |||||||
| 
 | 
 | ||||||
| ```javascript | ```javascript | ||||||
| var token = notp.getHOTP({ | var token = notp.getHOTP({ | ||||||
|     K : 'USER SPECIFIC KEY', // Should be ASCII string |     key : 'USER SPECIFIC KEY', // Should be ASCII string | ||||||
|     C : 5 // COUNTER VALUE |     token : 5 // COUNTER VALUE | ||||||
| }); | }); | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| @ -186,7 +186,7 @@ var token = notp.getHOTP({ | |||||||
| 
 | 
 | ||||||
| ```javascript | ```javascript | ||||||
| var token = notp.getTOTP({ | var token = notp.getTOTP({ | ||||||
|     K : 'USER SPECIFIC KEY' // Should be ASCII string |     key : 'USER SPECIFIC KEY' // Should be ASCII string | ||||||
| }); | }); | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user