File tree Expand file tree Collapse file tree
kotlin/com/yourssu/scouter/common/application/support/configuration Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,12 +8,16 @@ import io.swagger.v3.oas.models.security.OAuthFlows
88import io.swagger.v3.oas.models.security.Scopes
99import io.swagger.v3.oas.models.security.SecurityRequirement
1010import io.swagger.v3.oas.models.security.SecurityScheme
11+ import org.springframework.beans.factory.annotation.Value
1112import org.springframework.context.annotation.Bean
1213import org.springframework.context.annotation.Configuration
1314
1415@Configuration
1516class SwaggerConfiguration {
1617
18+ @Value(" \$ {domain}" )
19+ private lateinit var domain: String
20+
1721 companion object {
1822 const val OAUTH2 = " oauth2"
1923 }
@@ -38,8 +42,8 @@ class SwaggerConfiguration {
3842 .authorizationCode(
3943 OAuthFlow ()
4044 .authorizationUrl(" https://accounts.google.com/o/oauth2/auth" )
41- .tokenUrl(" http://localhost:8080 /oauth2/swagger/callback" )
42- .refreshUrl(" http://localhost:8080 /oauth2/swagger/callback" )
45+ .tokenUrl(" ${domain} /oauth2/swagger/callback" )
46+ .refreshUrl(" ${domain} /oauth2/swagger/callback" )
4347 .scopes(createGoogleScopes())
4448 )
4549 )
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ oauth2:
3838 - https://www.googleapis.com/auth/drive.readonly
3939 - https://www.googleapis.com/auth/forms.responses.readonly
4040 - https://www.googleapis.com/auth/gmail.send
41+ domain : https://api.scouter.yourssu.com
4142
4243springdoc :
4344 swagger-ui :
Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ oauth2:
4646 - https://www.googleapis.com/auth/drive.readonly
4747 - https://www.googleapis.com/auth/forms.responses.readonly
4848 - https://www.googleapis.com/auth/gmail.send
49+ domain : http://localhost:8080
4950
5051springdoc :
5152 swagger-ui :
@@ -57,4 +58,4 @@ springdoc:
5758 oauth :
5859 client-id : ${GOOGLE_OAUTH_CLIENT_ID}
5960 client-secret : ${GOOGLE_OAUTH_CLIENT_SECRET}
60- oauth2-redirect-url : ${SWAGGER_OAUTH2_REDIRECT_URL}
61+ oauth2-redirect-url : ${SWAGGER_OAUTH2_REDIRECT_URL}
You can’t perform that action at this time.
0 commit comments