spring-projects / spring-projects/spring-security
JdbcTokenRepositoryImpl - Table name should have configurable
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 9.6k
- Forks
- 6.3k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 52
Description
Summary
The table name (persistent_logins) lives in final strings for multiple times. Why isn't there a better approach for this?
E.g.: public void setTokenTableName(String tableName) which can come from a new interface e.g. TableAwareTokenRepository or something like that.
Actual Behavior
The end-user cannot configure the tablename
Expected Behavior
I suggest it should be configurable.
Version
4.2.3.RELEASE
Sample
/** Default SQL for creating the database table to store the tokens */
public static final String CREATE_TABLE_SQL = "create table persistent_logins (username varchar(64) not null, series varchar(64) primary key, "
+ "token varchar(64) not null, last_used timestamp not null)";
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with JdbcTokenRepositoryImpl and inspect the repeated persistent_logins table name, including CREATE_TABLE_SQL. Trace how the repository creates and uses the token table, then determine the configuration boundary requested by the issue. Done means the table name can be configured without changing the repository's token-storage behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- authentication
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100