#30 Add tests for jwt logic and group token logic

This commit is contained in:
william 2022-05-06 07:43:36 -04:00
parent ed0e5d89d3
commit d02faf7bce
3 changed files with 3 additions and 6 deletions

View File

@ -106,10 +106,6 @@ tasks.withType<JavaCompile>() {
tasks.withType<KotlinCompile>().all {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.toString()
freeCompilerArgs = listOf(
"-Xopt-in=kotlin.contracts.ExperimentalContracts",
"-Xinline-classes"
)
}
}

View File

@ -21,6 +21,7 @@ object Constants {
const val LOGIN = "$BASE_PATH/account/login"
const val GROUP_LOGIN = "$BASE_PATH/account/login/group"
const val LOGOUT = "$BASE_PATH/account/logout"
}
object CookieNames {

View File

@ -78,10 +78,10 @@ class UserController(private val userLogic: UserLogic) {
}
@RestController
@RequestMapping("api")
@RequestMapping(Constants.ControllerPaths.LOGOUT)
@Profile("!emergency")
class LogoutController(private val userLogic: UserLogic) {
@GetMapping("logout")
@GetMapping
@PreAuthorize("isFullyAuthenticated()")
fun logout(request: HttpServletRequest) =
ok {