-
Notifications
You must be signed in to change notification settings - Fork 6k
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 Support JDBC Repositories For WebAuthn #16282
Conversation
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.
Thanks for the PR @franticticktick! I've left feedback inline
web/src/main/resources/org/springframework/security/user-entities-schema.sql
Outdated
Show resolved
Hide resolved
...gframework/security/web/webauthn/management/JdbcPublicKeyCredentialUserEntityRepository.java
Show resolved
Hide resolved
...gframework/security/web/webauthn/management/JdbcPublicKeyCredentialUserEntityRepository.java
Outdated
Show resolved
Hide resolved
...gframework/security/web/webauthn/management/JdbcPublicKeyCredentialUserEntityRepository.java
Show resolved
Hide resolved
139a8a0
to
21da51d
Compare
21da51d
to
aa64c44
Compare
Thanks for the Pull Request! This is now merged into main 😄 |
Issue spring-projectsgh-16282 Signed-off-by: Daeho Kwon <trewq231@naver.com>
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.
A CredentialRecord
would be updated in every authentication. An existing row should be updated.
@Override | ||
public void save(CredentialRecord record) { | ||
Assert.notNull(record, "record cannot be null"); | ||
List<SqlParameterValue> parameters = this.credentialRecordParametersMapper.apply(record); | ||
try (LobCreator lobCreator = this.lobHandler.getLobCreator()) { | ||
PreparedStatementSetter pss = new LobCreatorArgumentPreparedStatementSetter(lobCreator, | ||
parameters.toArray()); | ||
this.jdbcOperations.update(SAVE_CREDENTIAL_RECORD_SQL, pss); | ||
} | ||
} |
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 believe an insert-or-update is also required here.
Closes gh-16224