https://issues.apache.org/bugzilla/show_bug.cgi?id=53756
Priority: P2 Bug ID: 53756 Assignee: dev@tomcat.apache.org Summary: org.apache.catalina.realm.JDBCRealm should have an option to return the user_id instead of the user_name Severity: enhancement Classification: Unclassified OS: All Reporter: bl...@gmx.net Hardware: All Status: NEW Version: trunk Component: Catalina Product: Tomcat 7 When JDBCRealm is called with j_username, it always returns the username as entered. It should be possible to give another optional column name from the USERS table as new attribute in the <Realm ... /> tag. This column should then be returned instead of the name entered in j_username as username. Reason: In many systems the USERS table is set up like this: CREATE TABLE t_login ( id INTEGER NOT NULL, loginname VARCHAR2 (50 CHAR) NOT NULL, passwdhash VARCHAR2 (64 CHAR) NOT NULL, lastlogin DATE, CONSTRAINT PK_login PRIMARY KEY (id), CONSTRAINT UC_login_loginname UNIQUE (loginname) ); As one can see the username is unique, but is not the primary key. This is necessary to be able change the username within you program. In this case all other tables with "modified_by"-columns will reference to the "id"-column, so the "id"-column is the column that is really needed in the application after a successful login. What do you think? -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org