chore: マージを修正

This commit is contained in:
usbharu 2024-05-16 15:34:32 +09:00
parent e986b6cf77
commit 931a7a638a
9 changed files with 90 additions and 26 deletions

View File

@ -215,7 +215,7 @@ class SecurityConfig {
authorize(GET, "/users/*", permitAll)
authorize(GET, "/users/*/posts/*", permitAll)
authorize("/auth/sign_up", hasRole("ANONYMOUS"))
authorize("/dev/usbharu/hideout/core/service/auth/sign_up", hasRole("ANONYMOUS"))
authorize(GET, "/files/*", permitAll)
authorize(GET, "/users/*/icon.jpg", permitAll)
authorize(GET, "/users/*/header.jpg", permitAll)

View File

@ -0,0 +1,23 @@
/*
* Copyright (C) 2024 usbharu
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package dev.usbharu.hideout.core.service.auth
import dev.usbharu.hideout.core.domain.model.actor.Actor
interface AuthApiService {
suspend fun registerAccount(registerAccountDto: RegisterAccountDto): Actor
}

View File

@ -1,3 +1,19 @@
/*
* Copyright (C) 2024 usbharu
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package dev.usbharu.hideout.core.service.auth
import com.fasterxml.jackson.databind.ObjectMapper

View File

@ -0,0 +1,25 @@
/*
* Copyright (C) 2024 usbharu
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package dev.usbharu.hideout.core.service.auth
data class RecaptchaResult(
val success: Boolean,
val challenge_ts: String,
val hostname: String,
val score: Float,
val action: String
)

View File

@ -0,0 +1,23 @@
/*
* Copyright (C) 2024 usbharu
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package dev.usbharu.hideout.core.service.auth
data class RegisterAccountDto(
val username:String,
val password:String,
val recaptchaResponse:String
)

View File

@ -15,7 +15,8 @@
</head>
<body>
<form method='post' th:action="@{/auth/sign_up}" th:disabled="${applicationConfig.private}">
<form method='post' th:action="@{/dev/usbharu/hideout/core/service/auth/sign_up}"
th:disabled="${applicationConfig.private}">
<input name='username' type='text' value=''>
<input name='password' type='password'>
<input type="hidden" name="recaptchaResponse" id="recaptchaResponse">

View File

@ -1,8 +0,0 @@
package dev.usbharu.hideout.core.service.auth
import dev.usbharu.hideout.core.domain.model.actor.Actor
import dev.usbharu.hideout.core.domain.model.userdetails.UserDetail
interface AuthApiService {
suspend fun registerAccount(registerAccountDto: RegisterAccountDto): Actor
}

View File

@ -1,9 +0,0 @@
package dev.usbharu.hideout.core.service.auth
data class RecaptchaResult(
val success: Boolean,
val challenge_ts: String,
val hostname: String,
val score: Float,
val action: String
)

View File

@ -1,7 +0,0 @@
package dev.usbharu.hideout.core.service.auth
data class RegisterAccountDto(
val username:String,
val password:String,
val recaptchaResponse:String
)