Merge pull request #4013 from specklesystems/dim/speckle-desktop-auth-service
feat: adds a first party app for the desktop auth service
This commit is contained in:
@@ -12,6 +12,7 @@ export enum DefaultAppIds {
|
||||
Explorer = 'explorer',
|
||||
DesktopManager = 'sdm',
|
||||
Connector = 'sca',
|
||||
SpeckleDesktopAuthService = 'sdas',
|
||||
Excel = 'spklexcel',
|
||||
PowerBI = 'spklpwerbi',
|
||||
Automate = 'spklautoma'
|
||||
@@ -77,6 +78,26 @@ const SpeckleConnectorApp = {
|
||||
]
|
||||
}
|
||||
|
||||
/** Next gen connectors */
|
||||
const SpeckleDesktopAuthService = {
|
||||
id: DefaultAppIds.SpeckleDesktopAuthService,
|
||||
secret: DefaultAppIds.SpeckleDesktopAuthService,
|
||||
name: 'Speckle Connector',
|
||||
description:
|
||||
'Speckle desktop authentication service. This application helps link your Speckle account with all host application connectors, like Revit, Rhino etc.',
|
||||
trustByDefault: true,
|
||||
public: true,
|
||||
redirectUrl: 'http://localhost:29364',
|
||||
scopes: [
|
||||
Scopes.Streams.Read,
|
||||
Scopes.Streams.Write,
|
||||
Scopes.Profile.Read,
|
||||
Scopes.Profile.Email,
|
||||
Scopes.Users.Read,
|
||||
Scopes.Users.Invite
|
||||
]
|
||||
}
|
||||
|
||||
const SpeckleExcel = {
|
||||
id: DefaultAppIds.Excel,
|
||||
secret: DefaultAppIds.Excel,
|
||||
@@ -140,6 +161,7 @@ const defaultApps = [
|
||||
SpeckleApiExplorer,
|
||||
SpeckleDesktopApp,
|
||||
SpeckleConnectorApp,
|
||||
SpeckleDesktopAuthService,
|
||||
SpeckleExcel,
|
||||
SpecklePowerBi,
|
||||
SpeckleAutomate
|
||||
|
||||
@@ -232,7 +232,7 @@ describe('GraphQL @apps-api', () => {
|
||||
expect(res).to.be.json
|
||||
expect(res.body.errors).to.not.exist
|
||||
expect(res.body.data.apps).to.be.an('array')
|
||||
expect(res.body.data.apps.length).to.equal(8)
|
||||
expect(res.body.data.apps.length).to.equal(9)
|
||||
})
|
||||
|
||||
it('Should get app info without secret if not authenticated and owner', async () => {
|
||||
|
||||
@@ -189,7 +189,7 @@ describe('Services @apps-services', () => {
|
||||
it('Should get all the public apps on this server', async () => {
|
||||
const apps = await getAllPublicApps()
|
||||
expect(apps).to.be.an('array')
|
||||
expect(apps.length).to.equal(8)
|
||||
expect(apps.length).to.equal(9)
|
||||
})
|
||||
|
||||
it('Should fail to register an app with no scopes', async () => {
|
||||
|
||||
Reference in New Issue
Block a user