You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
wiki/backend/api/authentication.mjs

59 lines
1.1 KiB

/**
* Authentication API Routes
*/
async function routes (app, options) {
app.get('/sites/:siteId/auth/strategies', {
schema: {
summary: 'List all site authentication strategies',
tags: ['Authentication'],
params: {
type: 'object',
properties: {
siteId: {
type: 'string',
format: 'uuid'
}
}
},
querystring: {
type: 'object',
properties: {
visibleOnly: {
type: 'boolean',
default: false
}
}
}
}
}, async (req, reply) => {
return []
})
app.post('/auth/login', {
schema: {
summary: 'Login',
tags: ['Authentication'],
body: {
type: 'object',
required: ['path'],
properties: {
path: {
type: 'string',
minLength: 1,
maxLength: 255
}
},
examples: [
{
path: 'foo/bar'
}
]
}
}
}, async (req, reply) => {
return []
})
}
export default routes