console.log({_at, ...})
This commit is contained in:
		
							parent
							
								
									2294243f9d
								
							
						
					
					
						commit
						ff499ffa4d
					
				@ -10,7 +10,7 @@ module.exports = {
 | 
			
		||||
  },
 | 
			
		||||
  createToken (content, key = my.envar?.tokenKey || wo?.envar?.tokenKey) {
 | 
			
		||||
    if (!key) {
 | 
			
		||||
      console.warn('*** tokenkey is empty! ***')
 | 
			
		||||
      console.warn({ _at: new Date().toJSON(), about: '*** tokenkey is empty! ***' })
 | 
			
		||||
    }
 | 
			
		||||
    // content 可以是数字,非空字符串或非空对象,不可以是数组。
 | 
			
		||||
    // key 可以未定义,则默认设为空字符串,再转化为哈希。(jsonwebtoken 要求 key 必须有值)
 | 
			
		||||
@ -28,7 +28,7 @@ module.exports = {
 | 
			
		||||
  },
 | 
			
		||||
  verifyToken (token, key = my.envar?.tokenKey || wo?.envar?.tokenKey) {
 | 
			
		||||
    if (!key) {
 | 
			
		||||
      console.warn('*** tokenkey is empty! ***')
 | 
			
		||||
      console.warn({ _at: new Date().toJSON(), about: '*** tokenkey is empty! ***' })
 | 
			
		||||
    }
 | 
			
		||||
    if (!token) {
 | 
			
		||||
      return null
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user