feat: ログイン用ページをMastodonと統一

This commit is contained in:
usbharu 2024-09-05 11:55:35 +09:00
parent 15cb1375c8
commit 7b77b097ca
Signed by: usbharu
GPG Key ID: 6556747BF94EEBC8
1 changed files with 4 additions and 2 deletions

View File

@ -68,7 +68,7 @@ class SecurityConfig {
OAuth2AuthorizationServerConfiguration.applyDefaultSecurity(http) OAuth2AuthorizationServerConfiguration.applyDefaultSecurity(http)
http { http {
exceptionHandling { exceptionHandling {
authenticationEntryPoint = LoginUrlAuthenticationEntryPoint("/login") authenticationEntryPoint = LoginUrlAuthenticationEntryPoint("/auth/sign_in")
} }
} }
return http.build() return http.build()
@ -80,7 +80,7 @@ class SecurityConfig {
http { http {
authorizeHttpRequests { authorizeHttpRequests {
authorize("/error", permitAll) authorize("/error", permitAll)
authorize("/login", permitAll) authorize("/auth/sign_in", permitAll)
authorize(GET, "/.well-known/**", permitAll) authorize(GET, "/.well-known/**", permitAll)
authorize(GET, "/nodeinfo/2.0", permitAll) authorize(GET, "/nodeinfo/2.0", permitAll)
@ -91,10 +91,12 @@ class SecurityConfig {
authorize(GET, "/files/*", permitAll) authorize(GET, "/files/*", permitAll)
authorize(POST, "/publish", authenticated) authorize(POST, "/publish", authenticated)
authorize(GET, "/publish", authenticated) authorize(GET, "/publish", authenticated)
authorize(GET, "/", permitAll)
authorize(anyRequest, authenticated) authorize(anyRequest, authenticated)
} }
formLogin { formLogin {
loginPage = "/auth/sign_in"
} }
} }
return http.build() return http.build()