v1.2.0 - Added session codes
This version includes several changes to the SpotifyLink project, focusing on adding session management, improving the user interface, and refactoring the code for better organization and readability. The most important changes are grouped by theme below.
Session Management Improvements:
- Added
sessionCodegeneration and validation methods in theMainclass to manage user sessions. (src/main/de.bytephil/main/Main.java, [1] [2] [3] [4] - Updated WebSocket message handling to include session code validation and actions based on user type (ADMIN, USER, FORBIDDEN). (
src/main/de.bytephil/main/Main.java, [1] [2] [3] [4] [5]
User Interface Enhancements:
- Modified
admin.htmlto display and manage session codes, including buttons for sharing and regenerating the session code. (src/main/resources/WebPages/admin.html, [1] [2] - Updated
adminscript.jsto handle session code display and sharing functionality. (src/main/resources/WebPages/assets/script/adminscript.js, [1] [2] [3] [4]
Code Refactoring:
- Refactored WebSocket message handling in
adminscript.jsto use a unified data structure for sending actions and content. (src/main/resources/WebPages/assets/script/adminscript.js, src/main/resources/WebPages/assets/script/adminscript.jsL140-R155) - Removed redundant code and improved readability in the
Mainclass by consolidating message handling logic. (src/main/de.bytephil/main/Main.java, [1] [2]
New Features:
- Added a new
UserTypeenum to manage different user roles within the application. (src/main/de.bytephil/enums/UserType.java, src/main/de.bytephil/enums/UserType.javaR1-R5) - Introduced a secure random session code generator to enhance session management security. (
src/main/de.bytephil/main/Main.java, src/main/de.bytephil/main/Main.javaR300-R326)
Minor Changes:
- Updated the project version in
pom.xmlto 1.2.0. (pom.xml, pom.xmlL10-R10) - Removed unnecessary imports and print statements to clean up the codebase. (
src/main/de.bytephil/main/Main.java, [1] [2]