adjust loginCode and resourceOwnerPassword
This commit is contained in:
		
							parent
							
								
									3d199e6516
								
							
						
					
					
						commit
						268d12372d
					
				| @ -169,7 +169,7 @@ | ||||
|     return result; | ||||
|   }; | ||||
| 
 | ||||
|   core.loginCode = function (directive, username, opts) { | ||||
|   core.loginCode = function (directive, opts) { | ||||
|     //
 | ||||
|     // Example Resource Owner Password Request
 | ||||
|     // (generally for 1st party and direct-partner mobile apps, and webapps)
 | ||||
| @ -183,7 +183,7 @@ | ||||
| 
 | ||||
|     var args = directive.otp; | ||||
|     var params = { | ||||
|       "username": username || opts.id || opts.username | ||||
|       "username": opts.id || opts.username | ||||
|     , "request_otp": true // opts.requestOtp || undefined
 | ||||
|     //, "jwt": opts.jwt // TODO sign a proof
 | ||||
|     }; | ||||
| @ -232,7 +232,9 @@ | ||||
|     var params = { | ||||
|       "grant_type": grantType | ||||
|     , "username": username | ||||
|     , "password": (opts.otpUuid && (opts.otpUuid + ':') || '') + passphrase // might be otpCode
 | ||||
|       // ('otp:' + opts.otpUuid + ':' + opts.otp)) // for backwards compat?
 | ||||
|       // ('totp:' + opts.totp) // for backwards compat?
 | ||||
|     , "password": passphrase || undefined | ||||
|     , "totp": opts.totp || opts.totpToken || undefined | ||||
|     , "otp": opts.otp || opts.otpCode || undefined | ||||
|     , "otp_uuid": opts.otpUuid || undefined | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user