Skip to content

Commit 2267611

Browse files
authored
Merge pull request #122 from FieldDB/remove_oauth_provider
Remove oauth provider
2 parents c92b5f5 + f9ba7b8 commit 2267611

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+4811
-30172
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ config/production.*
99
config/local.*
1010
etc
1111
Dockerfile-couchdb
12+
db
1213

1314
# Ignore natural lib
1415
public/libs/natural/

auth_service.js

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ const favicon = require('serve-favicon');
1919
const path = require('path');
2020

2121
/* Load modules provided by this codebase */
22-
const authenticationMiddleware = require('./middleware/authentication');
2322
const authWebServiceRoutes = require('./routes/routes');
2423
const { errorHandler } = require('./middleware/error-handler');
2524
const deprecatedRoutes = require('./routes/deprecated');
@@ -62,10 +61,6 @@ debug(`Accepting api version ${apiVersion}`);
6261
/**
6362
* Middleware
6463
*/
65-
// The example attaches it to the express
66-
// https://github.com/oauthjs/express-oauth-server#quick-start
67-
// service.oauth = oauthMiddleware;
68-
authWebService.use(authenticationMiddleware.jwt);
6964

7065
authWebService.use(favicon(path.join(__dirname, '/public/favicon.ico')));
7166
authWebService.use(bunyan({
@@ -105,12 +100,6 @@ authWebService.options('*', (req, res) => {
105100
}
106101
});
107102

108-
authWebService.use('/bower_components', express.static(path.join(__dirname,
109-
'/public/components/as-ui-auth/bower_components')));
110-
authWebService.use('/authentication', authenticationMiddleware.redirectAuthenticatedUser, express.static(path.join(__dirname, '/public/components/as-ui-auth/components')));
111-
authWebService.use('/authentication/register', authenticationMiddleware.redirectAuthenticatedUser,
112-
express.static(path.join(__dirname, '/public/components/as-ui-auth/components/signup')));
113-
114103
/**
115104
* Set up all the available URL authWebServiceRoutes see routes/routes.js for more details
116105
*/

bower.json

Lines changed: 0 additions & 13 deletions
This file was deleted.

config/jwt_debug.pem

Lines changed: 0 additions & 15 deletions
This file was deleted.

config/jwt_debug.pem.js

Lines changed: 0 additions & 15 deletions
This file was deleted.

config/jwt_debug.pub.js

Lines changed: 0 additions & 6 deletions
This file was deleted.

db/.gitignore

Lines changed: 0 additions & 4 deletions
This file was deleted.

lib/About.js

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -13,39 +13,6 @@ module.exports.FieldDB = function FieldDB() {
1313
resourcePath: '/users',
1414
produces: ['application/json', 'application/xml', 'text/plain', 'text/html', 'application/x-latex', 'application/tar', 'application/zip', 'application/pdf', 'text/srt', 'text/websrt', 'text/x-textgrid', 'text/csv'],
1515
apis: [],
16-
authorizations: {
17-
oauth2: {
18-
type: 'oauth2',
19-
scopes: ['PUBLIC'],
20-
grantTypes: {
21-
implicit: {
22-
loginEndpoint: {
23-
url: 'http://localhost:8002/oauth/dialog'
24-
},
25-
tokenName: 'access_code'
26-
},
27-
authorization_code: {
28-
tokenRequestEndpoint: {
29-
url: 'http://localhost:8002/oauth/requestToken',
30-
clientIdName: 'client_id',
31-
clientSecretName: 'client_secret'
32-
},
33-
tokenEndpoint: {
34-
url: 'http://localhost:8002/oauth/token',
35-
tokenName: 'access_code'
36-
}
37-
}
38-
}
39-
},
40-
apiKey: {
41-
type: 'apiKey',
42-
keyName: 'api_key',
43-
passAs: 'header'
44-
},
45-
basicAuth: {
46-
type: 'basicAuth'
47-
}
48-
},
4916
models: {
5017
User: {
5118
username: 'User',

lib/token.js

Lines changed: 0 additions & 56 deletions
This file was deleted.

middleware/authentication.js

Lines changed: 0 additions & 122 deletions
This file was deleted.

0 commit comments

Comments
 (0)