-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add JPA implementions of UserDao/ProfileDao #1603
Conversation
*/ | ||
public class H2ExceptionHandler implements ExceptionHandler { | ||
|
||
// TODO move it from here |
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.
When do you plan remove it?
few remarks:
|
np, i will extract ecnryptors code to the different commit.
Current TCK approach allows us use the same tests for different implementations Local/Ldap/Jpa.
che-core-api-jdbc module contains common error codes and error codes mapper astraction used by daos, che-core-api-jdbc-vendor-h2 provides an implementation of error codes mapper specific for h2, while error codes are jdbc errors.
okay thank you, i am using it for test purposes only, so i will remove it from there.
We will use this annotation, i will introduce it with next pull request, right now alot of things depend on this pull request that's why we decided to merge it asap which allows me and guys to work on jpa implementations separately. |
thx
It allows to test with different JPA providers and different database as well
sure
ok
Yes this Guice stuff or better, CDI, which offer more stuff around Java EE component will allow more possibilities around PersistenceContext |
final Integer iterations = tryParse(firstNonNull(matcher.group("iterations"), "")); | ||
final String salt = matcher.group("saltHash"); | ||
final String pwdHash = matcher.group("pwdHash"); | ||
if (salt == null || iterations == null || iterations <= 0 || pwdHash == null) { |
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.
Encrypted password matches regexp and regexp require 1+ symbols in each group. It looks like NULL checks are not needed.
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.
I mean salt and pwdHash
a9732dc
to
1b237b3
Compare
1b237b3
to
4d12541
Compare
Pull request updated, @benoitf @skabashnyuk please check |
return false; | ||
} | ||
// retrieve salt, password hash and iterations count from hash | ||
final Integer iterations = tryParse(firstNonNull(matcher.group("iterations"), "")); |
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.
I think group can't be Null in that case
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.
yes, thank you!
ok |
ok |
LGTM |
Build # 1091 - FAILED Please check console output at http://ci.codenvy-dev.com/jenkins/job/che-pullrequests-build/1091/ to view the results. |
Along with JPA implementations i added 2 password encryptors SHA-512 and PBKDF2.
JpaUserDao
andJpaProfileDao
pass all the TCK prepared before.@skabashnyuk, @sleshchenko, @garagatyi, @akorneta can you please review.
Please note that this will be merged into the
jpa-integration
branch which will be merged to the master when all the DAOs are migrated to JPA.