Skip to content
Snippets Groups Projects
Verified Commit 6d9bee80 authored by Louis's avatar Louis :fire:
Browse files

Add definitions for oauth scopes

parent 6d067dd7
No related branches found
No related tags found
No related merge requests found
......@@ -194,6 +194,8 @@ class KoaOAuthServer {
const scopes = describeScopeRequest(query.scope)
console.log(scopes)
return ctx.render('auth/accept-oauth', {
user,
client,
......@@ -252,7 +254,32 @@ const scopeDescriptionMap = {
icon: 'admin',
name: 'Full Access',
description: 'Full access to your account, including the ability to create, update and delete any user information, metrics and files.'
}
},
'metrics:create': {
name: 'Create Metrics',
description: 'The ability to add data metrics linked to your account. Remember that connected apps that create metrics will know your location!',
},
'files:upload': {
name: 'Upload Files',
description: 'The ability to upload images linked to your account',
},
'files:read': {
name: 'Read Files',
description: 'The ability to see and download images that you\'ve uploaded to your account',
},
'profile:read': {
name: 'Read Profile',
description: 'The ability to see any information associated with your user profile. This includes your name and email address',
},
'profile:write': {
name: 'Modify Profile',
description: 'The ability to edit any information associated with your user profile. This includes your name',
},
'profile:stats': {
name: 'Profile Stats',
description: 'The ability to see information about your account stats, including your points and citizen scientist level',
},
}
function describeScopeRequest(scope = '*') {
const scopes = scope.split(' ')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment