mirror of https://github.com/usbharu/Hideout.git
chore: マージを修正
This commit is contained in:
parent
e986b6cf77
commit
931a7a638a
|
@ -215,7 +215,7 @@ class SecurityConfig {
|
||||||
authorize(GET, "/users/*", permitAll)
|
authorize(GET, "/users/*", permitAll)
|
||||||
authorize(GET, "/users/*/posts/*", 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, "/files/*", permitAll)
|
||||||
authorize(GET, "/users/*/icon.jpg", permitAll)
|
authorize(GET, "/users/*/icon.jpg", permitAll)
|
||||||
authorize(GET, "/users/*/header.jpg", permitAll)
|
authorize(GET, "/users/*/header.jpg", permitAll)
|
||||||
|
|
|
@ -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
|
||||||
|
}
|
|
@ -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
|
package dev.usbharu.hideout.core.service.auth
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper
|
import com.fasterxml.jackson.databind.ObjectMapper
|
|
@ -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
|
||||||
|
)
|
|
@ -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
|
||||||
|
)
|
|
@ -15,7 +15,8 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<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='username' type='text' value=''>
|
||||||
<input name='password' type='password'>
|
<input name='password' type='password'>
|
||||||
<input type="hidden" name="recaptchaResponse" id="recaptchaResponse">
|
<input type="hidden" name="recaptchaResponse" id="recaptchaResponse">
|
||||||
|
|
|
@ -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
|
|
||||||
}
|
|
|
@ -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
|
|
||||||
)
|
|
|
@ -1,7 +0,0 @@
|
||||||
package dev.usbharu.hideout.core.service.auth
|
|
||||||
|
|
||||||
data class RegisterAccountDto(
|
|
||||||
val username:String,
|
|
||||||
val password:String,
|
|
||||||
val recaptchaResponse:String
|
|
||||||
)
|
|
Loading…
Reference in New Issue