├── .circleci └── config.yml ├── .gitignore ├── .idea ├── .gitignore ├── compiler.xml.bak ├── demo-maven-springboot.iml ├── encodings.xml ├── homepage-application-service.iml ├── jarRepositories.xml ├── misc.xml ├── uiDesigner.xml └── vcs.xml ├── LICENSE ├── README.md ├── gradle └── wrapper │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── settings.gradle.kts └── src ├── main ├── kotlin │ └── com │ │ └── hongwei │ │ ├── AuthenticationApplication.kt │ │ ├── ServletInitializer.kt │ │ ├── constants │ │ ├── Constants.kt │ │ ├── ErrorDefine.kt │ │ └── SecurityConfigurations.kt │ │ ├── controller │ │ ├── AuthenticateController.kt │ │ ├── PublicAuthenticateController.kt │ │ ├── RegisterController.kt │ │ ├── admin │ │ │ ├── GuestController.kt │ │ │ └── UserAdminController.kt │ │ └── test │ │ │ └── TestController.kt │ │ ├── model │ │ ├── contract │ │ │ └── Role.kt │ │ ├── jpa │ │ │ ├── Guest.kt │ │ │ ├── GuestRepository.kt │ │ │ ├── User.kt │ │ │ └── UserRepository.kt │ │ ├── preference │ │ │ └── Preference.kt │ │ └── privilege │ │ │ ├── BlogPrivilege.kt │ │ │ ├── Module.kt │ │ │ ├── PhotoPrivilege.kt │ │ │ └── Privilege.kt │ │ ├── security │ │ ├── AccessTokenService.kt │ │ ├── JwtUtil.kt │ │ ├── PublicTokenService.kt │ │ ├── RefreshTokenService.kt │ │ ├── SecurityConfiguration.kt │ │ ├── WebCORSConfig.kt │ │ ├── filters │ │ │ └── JwtRequestFilter.kt │ │ ├── model │ │ │ ├── AuthenticationRequest.kt │ │ │ ├── AuthenticationResponse.kt │ │ │ ├── AuthorisationRequest.kt │ │ │ ├── AuthorisationResponse.kt │ │ │ ├── GeneratePublicTokenRequest.kt │ │ │ ├── GeneratePublicTokenResponse.kt │ │ │ ├── RefreshTokenRequest.kt │ │ │ ├── RefreshTokenResponse.kt │ │ │ ├── VerifyPublicTokenRequest.kt │ │ │ └── VerifyPublicTokenResponse.kt │ │ └── util │ │ │ ├── HMAC.kt │ │ │ ├── SaltUtil.kt │ │ │ └── TokenGenerator.kt │ │ └── service │ │ ├── AuthenticateService.kt │ │ ├── AuthenticateUserDetailsService.kt │ │ ├── GuestAdminService.kt │ │ ├── PublicAuthenticateService.kt │ │ ├── RegisterService.kt │ │ ├── UserAdminService.kt │ │ ├── compatibility │ │ └── WebSecurityConfig.kt │ │ ├── helper │ │ └── GuestCodeGenerator.kt │ │ └── model │ │ ├── AddGuestResponse.kt │ │ └── AddUserRequest.kt └── resources │ ├── application.properties.sample │ ├── log4j.properties │ └── test │ ├── preference-chn.json │ ├── preference-eng.json │ ├── privilege-fullaccess.json │ └── privilege.json └── test └── kotlin └── com └── hongwei └── AuthenticationApplicationTest.kt /.circleci/config.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/.circleci/config.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/.gitignore -------------------------------------------------------------------------------- /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /workspace.xml -------------------------------------------------------------------------------- /.idea/compiler.xml.bak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/.idea/compiler.xml.bak -------------------------------------------------------------------------------- /.idea/demo-maven-springboot.iml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/.idea/demo-maven-springboot.iml -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/.idea/encodings.xml -------------------------------------------------------------------------------- /.idea/homepage-application-service.iml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/.idea/homepage-application-service.iml -------------------------------------------------------------------------------- /.idea/jarRepositories.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/.idea/jarRepositories.xml -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/.idea/misc.xml -------------------------------------------------------------------------------- /.idea/uiDesigner.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/.idea/uiDesigner.xml -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/.idea/vcs.xml -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/README.md -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/gradle/wrapper/gradle-wrapper.properties -------------------------------------------------------------------------------- /gradlew: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/gradlew -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/gradlew.bat -------------------------------------------------------------------------------- /settings.gradle.kts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/settings.gradle.kts -------------------------------------------------------------------------------- /src/main/kotlin/com/hongwei/AuthenticationApplication.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/src/main/kotlin/com/hongwei/AuthenticationApplication.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/hongwei/ServletInitializer.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/src/main/kotlin/com/hongwei/ServletInitializer.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/hongwei/constants/Constants.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/src/main/kotlin/com/hongwei/constants/Constants.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/hongwei/constants/ErrorDefine.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/src/main/kotlin/com/hongwei/constants/ErrorDefine.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/hongwei/constants/SecurityConfigurations.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/src/main/kotlin/com/hongwei/constants/SecurityConfigurations.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/hongwei/controller/AuthenticateController.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/src/main/kotlin/com/hongwei/controller/AuthenticateController.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/hongwei/controller/PublicAuthenticateController.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/src/main/kotlin/com/hongwei/controller/PublicAuthenticateController.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/hongwei/controller/RegisterController.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/src/main/kotlin/com/hongwei/controller/RegisterController.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/hongwei/controller/admin/GuestController.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/src/main/kotlin/com/hongwei/controller/admin/GuestController.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/hongwei/controller/admin/UserAdminController.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/src/main/kotlin/com/hongwei/controller/admin/UserAdminController.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/hongwei/controller/test/TestController.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/src/main/kotlin/com/hongwei/controller/test/TestController.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/hongwei/model/contract/Role.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/src/main/kotlin/com/hongwei/model/contract/Role.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/hongwei/model/jpa/Guest.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/src/main/kotlin/com/hongwei/model/jpa/Guest.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/hongwei/model/jpa/GuestRepository.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/src/main/kotlin/com/hongwei/model/jpa/GuestRepository.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/hongwei/model/jpa/User.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/src/main/kotlin/com/hongwei/model/jpa/User.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/hongwei/model/jpa/UserRepository.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/src/main/kotlin/com/hongwei/model/jpa/UserRepository.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/hongwei/model/preference/Preference.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/src/main/kotlin/com/hongwei/model/preference/Preference.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/hongwei/model/privilege/BlogPrivilege.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/src/main/kotlin/com/hongwei/model/privilege/BlogPrivilege.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/hongwei/model/privilege/Module.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/src/main/kotlin/com/hongwei/model/privilege/Module.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/hongwei/model/privilege/PhotoPrivilege.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/src/main/kotlin/com/hongwei/model/privilege/PhotoPrivilege.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/hongwei/model/privilege/Privilege.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/src/main/kotlin/com/hongwei/model/privilege/Privilege.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/hongwei/security/AccessTokenService.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/src/main/kotlin/com/hongwei/security/AccessTokenService.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/hongwei/security/JwtUtil.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/src/main/kotlin/com/hongwei/security/JwtUtil.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/hongwei/security/PublicTokenService.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/src/main/kotlin/com/hongwei/security/PublicTokenService.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/hongwei/security/RefreshTokenService.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/src/main/kotlin/com/hongwei/security/RefreshTokenService.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/hongwei/security/SecurityConfiguration.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/src/main/kotlin/com/hongwei/security/SecurityConfiguration.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/hongwei/security/WebCORSConfig.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/src/main/kotlin/com/hongwei/security/WebCORSConfig.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/hongwei/security/filters/JwtRequestFilter.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/src/main/kotlin/com/hongwei/security/filters/JwtRequestFilter.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/hongwei/security/model/AuthenticationRequest.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/src/main/kotlin/com/hongwei/security/model/AuthenticationRequest.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/hongwei/security/model/AuthenticationResponse.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/src/main/kotlin/com/hongwei/security/model/AuthenticationResponse.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/hongwei/security/model/AuthorisationRequest.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/src/main/kotlin/com/hongwei/security/model/AuthorisationRequest.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/hongwei/security/model/AuthorisationResponse.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/src/main/kotlin/com/hongwei/security/model/AuthorisationResponse.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/hongwei/security/model/GeneratePublicTokenRequest.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/src/main/kotlin/com/hongwei/security/model/GeneratePublicTokenRequest.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/hongwei/security/model/GeneratePublicTokenResponse.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/src/main/kotlin/com/hongwei/security/model/GeneratePublicTokenResponse.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/hongwei/security/model/RefreshTokenRequest.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/src/main/kotlin/com/hongwei/security/model/RefreshTokenRequest.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/hongwei/security/model/RefreshTokenResponse.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/src/main/kotlin/com/hongwei/security/model/RefreshTokenResponse.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/hongwei/security/model/VerifyPublicTokenRequest.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/src/main/kotlin/com/hongwei/security/model/VerifyPublicTokenRequest.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/hongwei/security/model/VerifyPublicTokenResponse.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/src/main/kotlin/com/hongwei/security/model/VerifyPublicTokenResponse.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/hongwei/security/util/HMAC.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/src/main/kotlin/com/hongwei/security/util/HMAC.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/hongwei/security/util/SaltUtil.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/src/main/kotlin/com/hongwei/security/util/SaltUtil.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/hongwei/security/util/TokenGenerator.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/src/main/kotlin/com/hongwei/security/util/TokenGenerator.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/hongwei/service/AuthenticateService.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/src/main/kotlin/com/hongwei/service/AuthenticateService.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/hongwei/service/AuthenticateUserDetailsService.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/src/main/kotlin/com/hongwei/service/AuthenticateUserDetailsService.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/hongwei/service/GuestAdminService.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/src/main/kotlin/com/hongwei/service/GuestAdminService.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/hongwei/service/PublicAuthenticateService.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/src/main/kotlin/com/hongwei/service/PublicAuthenticateService.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/hongwei/service/RegisterService.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/src/main/kotlin/com/hongwei/service/RegisterService.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/hongwei/service/UserAdminService.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/src/main/kotlin/com/hongwei/service/UserAdminService.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/hongwei/service/compatibility/WebSecurityConfig.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/src/main/kotlin/com/hongwei/service/compatibility/WebSecurityConfig.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/hongwei/service/helper/GuestCodeGenerator.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/src/main/kotlin/com/hongwei/service/helper/GuestCodeGenerator.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/hongwei/service/model/AddGuestResponse.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/src/main/kotlin/com/hongwei/service/model/AddGuestResponse.kt -------------------------------------------------------------------------------- /src/main/kotlin/com/hongwei/service/model/AddUserRequest.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/src/main/kotlin/com/hongwei/service/model/AddUserRequest.kt -------------------------------------------------------------------------------- /src/main/resources/application.properties.sample: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/src/main/resources/application.properties.sample -------------------------------------------------------------------------------- /src/main/resources/log4j.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/src/main/resources/log4j.properties -------------------------------------------------------------------------------- /src/main/resources/test/preference-chn.json: -------------------------------------------------------------------------------- 1 | {"locale": "zh-CN"} -------------------------------------------------------------------------------- /src/main/resources/test/preference-eng.json: -------------------------------------------------------------------------------- 1 | {"locale": "en-US", "redirect1": "/blog"} -------------------------------------------------------------------------------- /src/main/resources/test/privilege-fullaccess.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/src/main/resources/test/privilege-fullaccess.json -------------------------------------------------------------------------------- /src/main/resources/test/privilege.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/src/main/resources/test/privilege.json -------------------------------------------------------------------------------- /src/test/kotlin/com/hongwei/AuthenticationApplicationTest.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hongwei-bai/application-service-authentication/HEAD/src/test/kotlin/com/hongwei/AuthenticationApplicationTest.kt --------------------------------------------------------------------------------