Skip to content

Commit

Permalink
test properties
Browse files Browse the repository at this point in the history
  • Loading branch information
Max Zollbrecht committed Apr 24, 2024
1 parent edbd43c commit ef5738a
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public SecurityFilterChain noSecurityFilterChain(HttpSecurity http)
/** Swagger-API config for security */
@Configuration
@SecurityScheme(name = "ApiClient", type = SecuritySchemeType.OAUTH2, flows = @OAuthFlows(clientCredentials = @OAuthFlow(tokenUrl = "${app.security.token-url}")))
@SecurityScheme(name = "InternalLogin", type = SecuritySchemeType.OAUTH2, flows = @OAuthFlows(password = @OAuthFlow(tokenUrl = "${app.security.token-url}", authorizationUrl = "${app.security.authorization-url}")))
@SecurityScheme(name = "InternalLogin", type = SecuritySchemeType.OAUTH2, flows = @OAuthFlows(password = @OAuthFlow(tokenUrl = "${app.security.token-url}")))
public class SpringdocConfig {
}

Expand Down
6 changes: 6 additions & 0 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ springdoc:
clientId: ${app.security.api.client-id}
realm: ${app.security.realm}
appName: ${spring.application.name}
scopes:
- acr
- email
- profile
- roles
- web-origins
default-produces-media-type: application/json

server:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ActiveProfiles;

@SpringBootTest
@ActiveProfiles("test")
class KitaFinderEaiApplicationTest {

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.security.crypto.encrypt.TextEncryptor;
import org.springframework.test.context.ActiveProfiles;

/**
* Tests for {@link TextEncryptor}
*
* @author m.zollbrecht
*/
@SpringBootTest
@ActiveProfiles("test")
class PasswordEncoderTest {

@Autowired
Expand Down
6 changes: 6 additions & 0 deletions src/test/resources/application-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
app:
security:
api:
client-secret: "-"
internal:
client-secret: "-"

0 comments on commit ef5738a

Please sign in to comment.