New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes required for signup flow #62
Merged
Merged
Changes from 6 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
de25e2c
Changes required for signup flow
nicoknoll 4849562
Test failing somehow
nicoknoll 49549fa
Implemented breaking changes of feathers-auth 1.0.2 and refactored ac…
nicoknoll 957f9c4
added config to jwt and auth and added displayName protection to user
nicoknoll 29aea73
added basic token authentication to services
nicoknoll a58eeba
workin
nicoknoll 347ec6e
Carls comments
nicoknoll c900207
Linter
nicoknoll File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,9 @@ | ||
{ | ||
"host": "localhost", | ||
"port": 3030, | ||
"mongodb": "mongodb://localhost:27017/schulcloud", | ||
"public": "../public/", | ||
"auth": { | ||
"token": { | ||
"secret": "FQ5lS1j41dcZdaPFPP3VRPH6W2bt8Z19bmvcVz+8SH8PtfVpVTl/p+9D0jIdRhwC1UrWg69lTU9koFgugf9oZg==" | ||
}, | ||
"local": false | ||
} | ||
"host": "localhost", | ||
"port": 3030, | ||
"mongodb": "mongodb://localhost:27017/schulcloud", | ||
"public": "../public/", | ||
"auth": { | ||
"secret": "FQ5lS1j41dcZdaPFPP3VRPH6W2bt8Z19bmvcVz+8SH8PtfVpVTl/p+9D0jIdRhwC1UrWg69lTU9koFgugf9oZg==" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,9 @@ | ||
{ | ||
"host": "localhost", | ||
"port": 8080, | ||
"mongodb": "mongodb://localhost:27017/schulcloud", | ||
"public": "../public/", | ||
"auth": { | ||
"token": { | ||
"secret": "FQ5lS1j41dcZdaPFPP3VRPH6W2bt8Z19bmvcVz+8SH8PtfVpVTl/p+9D0jIdRhwC1UrWg69lTU9koFgugf9oZg==" | ||
}, | ||
"local": false | ||
} | ||
"host": "localhost", | ||
"port": 8080, | ||
"mongodb": "mongodb://localhost:27017/schulcloud", | ||
"public": "../public/", | ||
"auth": { | ||
"secret": "FQ5lS1j41dcZdaPFPP3VRPH6W2bt8Z19bmvcVz+8SH8PtfVpVTl/p+9D0jIdRhwC1UrWg69lTU9koFgugf9oZg==" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,9 @@ | ||
{ | ||
"host": "localhost", | ||
"port": 3031, | ||
"mongodb": "mongodb://localhost:27017/schulcloud-test", | ||
"public": "../public/", | ||
"auth": { | ||
"token": { | ||
"secret": "FQ5lS1j41dcZdaPFPP3VRPH6W2bt8Z19bmvcVz+8SH8PtfVpVTl/p+9D0jIdRhwC1UrWg69lTU9koFgugf9oZg==" | ||
}, | ||
"local": false | ||
} | ||
"host": "localhost", | ||
"port": 3031, | ||
"mongodb": "mongodb://localhost:27017/schulcloud-test", | ||
"public": "../public/", | ||
"auth": { | ||
"secret": "FQ5lS1j41dcZdaPFPP3VRPH6W2bt8Z19bmvcVz+8SH8PtfVpVTl/p+9D0jIdRhwC1UrWg69lTU9koFgugf9oZg==" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 4 additions & 5 deletions
9
...es/authentication/strategies/interface.js → src/services/account/strategies/interface.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
4 changes: 0 additions & 4 deletions
4
...ices/authentication/strategies/lernsax.js → src/services/account/strategies/lernsax.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
12 changes: 0 additions & 12 deletions
12
...vices/authentication/strategies/moodle.js → src/services/account/strategies/moodle.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
'use strict'; | ||
|
||
const auth = require('feathers-authentication'); | ||
const local = require('feathers-authentication-local'); | ||
const jwt = require('feathers-authentication-jwt'); | ||
|
||
const logger = require('winston'); | ||
|
||
exports.before = { | ||
create: [ | ||
auth.hooks.authenticate(['local', 'jwt']), | ||
(hook) => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as before |
||
const accountId = hook.params.payload.accountId; | ||
return hook.app.service('/accounts').get(accountId).then((account) => { | ||
if(account.userId) { | ||
hook.params.payload.userId = account.userId; | ||
} | ||
return hook; | ||
}); | ||
} | ||
], | ||
remove: [ | ||
auth.hooks.authenticate('jwt') | ||
] | ||
}; | ||
|
||
exports.after = { | ||
create: [], | ||
remove: [] | ||
}; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't use inline hooks of more than 2 lines