@infomaker/service-authorization-lib
Version:
IMID Service Authorization Library
30 lines (28 loc) • 563 B
JavaScript
class Request {
constructor(params, pluginConfig, token) {
return {
id: 'mock-req-id',
route: {
settings: {
plugins: {
authorization: pluginConfig
}
}
},
auth: {
credentials: null
},
raw: {
req: {
headers: {
authorization: token ? `Bearer ${token}` : undefined,
'x-imid-token': 'should be put in req credentials'
}
}
},
params: params,
response: {}
}
}
}
module.exports = Request