fix: メディアアップロードのスコープの設定を修正

This commit is contained in:
usbharu 2023-11-29 15:18:12 +09:00
parent 072767b56a
commit db6f9d5eb1
1 changed files with 2 additions and 0 deletions

View File

@ -190,6 +190,8 @@ class SecurityConfig {
it.requestMatchers(builder.pattern("/change-password")).authenticated()
it.requestMatchers(builder.pattern("/api/v1/accounts/verify_credentials"))
.hasAnyAuthority("SCOPE_read", "SCOPE_read:accounts")
it.requestMatchers(builder.pattern(HttpMethod.POST, "/api/v1/media"))
.hasAnyAuthority("SCOPE_write", "SCOPE_write:media")
it.anyRequest().permitAll()
}
http.oauth2ResourceServer {