Implement OAuth2 server, link oauth:Client and auth::Oauth2Client, implement permission checks
This commit is contained in:
@@ -26,6 +26,12 @@ class Session {
|
||||
|
||||
parent[parts.reverse()[0]] = value
|
||||
}
|
||||
|
||||
async check_permissions(...permissions) {
|
||||
const result = await axios.post('/api/v1/reflect/check_permissions', { permissions })
|
||||
if ( permissions.length === 1 ) return result.data.data[permissions[0]]
|
||||
return result.data.data
|
||||
}
|
||||
}
|
||||
|
||||
const session = new Session()
|
||||
|
||||
Reference in New Issue
Block a user