ywzx-serviceRecord

  1. vue paginator
  2. nodejs fs
  3. nodejs upload
  4. auth0

vue paginator

http://doc.huangsw.com/vue-easytable/app.html#/pagination
https://www.npmjs.com/package/vuejs-paginate

nodejs fs

var fs = require(‘fs’);
var dir = ‘./tmp’;

if (!fs.existsSync(dir)){
fs.mkdirSync(dir);
}

nodejs upload

https://medium.com/quick-code/uploading-files-and-serve-directory-listing-using-nodejs-6f353f65be5

auth0

function(user, context, callback) {
const namespace = ‘https://myapp.example.com/';
context.idToken[namespace + ‘favorite_color’] = user.favorite_color;
context.idToken[namespace + ‘preferred_contact’] = user.user_metadata.preferred_contact;
callback(null, user, context);
}

https://auth0.com/docs/api/authentication#get-user-info
GET https://staryun.auth0.com/userinfo
Authorization: ‘Bearer {ACCESS_TOKEN}’
GET https://staryun.auth0.com/userinfo
{
“sub”: “248289761001”,
“name”: “Jane Josephine Doe”,
“given_name”: “Jane”,
“family_name”: “Doe”,
“middle_name”: “Josephine”,
“nickname”: “JJ”,
“preferred_username”: “j.doe”,
“profile”: “http://exampleco.com/janedoe",
“picture”: “http://exampleco.com/janedoe/me.jpg",
“website”: “http://exampleco.com",
“email”: “janedoe@exampleco.com“,
“email_verified”: true,
“gender”: “female”,
“birthdate”: “1972-03-31”,
“zoneinfo”: “America/Los_Angeles”,
“locale”: “en-US”,
“phone_number”: “+1 (111) 222-3434”,
“phone_number_verified”: false,
“address”: {
“country”: “us”
},
“updated_at”: “1556845729”
}

error originated either by throwing inside of an async function without a catch
block, or by rejecting a promise which was not handled with .catch(). (rejection
id: 1)

{ iss: ‘https://staryun.auth0.com/',
sub: ‘auth0|5e01cbc4877c520e6e6b5d48’,
aud:
[ ‘https://ywzx.staryun.cn/api/',
https://staryun.auth0.com/userinfo' ],
iat: 1577176897,
exp: 1577263297,
azp: ‘O2T18zXia3Xgtpmcgt9mcBiF0JxHmzYo’,
scope: ‘openid email’,
permissions: [ ‘sqa:fullAccess’ ] }
GET /api/service-request 304


--Write by Marcustar,关关雎鸠,在河之洲
目录
Download 相册