验证模块
- Source:
 
Methods
(async, inner) authenticate(params, global) → {Promise.<object>}
验证用户,并颁发JWT。通过以下两种方式暴露:
- ajax: POST /api/auth
 - socket.io: emit auth
 
- Source:
 
Parameters:
| Name | Type | Description | 
|---|---|---|
params | 
            
            
            
                
object
            
             | 
            
            
            
                 请求数据 
  | 
        
global | 
            
            
            
                
object
            
             | 
            
            
            
Returns:
- Type:
 - 
        
Promise.<object> 
data 为新的JWT。