Tips on using restaf and restaflib in VA DDC
When running a DDC the app is running in a authenticated session. To enable restaf to use the current session, do the following:
async function setup() {
let p = {
authType: 'server',
host: window.location.origin
}
let msg = await store.logon(p);
...more stuff..
}
All subsequent calls to restaf and restaflib will run under the current session.
An important point to remember is that restaf will handle the xsrf tokens for your applications - more cool housekeeping by restaf.