summaryrefslogtreecommitdiff
path: root/eaaf-springboot-utils/src/test/java/at/gv
diff options
context:
space:
mode:
authorThomas <>2023-05-11 12:34:27 +0200
committerThomas <>2023-05-11 12:34:27 +0200
commit13da938658e0f799a7c89faadcfbbfee95a220d8 (patch)
treebbe38aa00660f760e3d7c19b756f790e1f673e30 /eaaf-springboot-utils/src/test/java/at/gv
parent342ec1478cb6f15deb1f359d429f521bac5f04c8 (diff)
downloadEAAF-Components-13da938658e0f799a7c89faadcfbbfee95a220d8.tar.gz
EAAF-Components-13da938658e0f799a7c89faadcfbbfee95a220d8.tar.bz2
EAAF-Components-13da938658e0f799a7c89faadcfbbfee95a220d8.zip
feat(spring): add authorisation configuration for multi-modul projects
Diffstat (limited to 'eaaf-springboot-utils/src/test/java/at/gv')
-rw-r--r--eaaf-springboot-utils/src/test/java/at/gv/egiz/eaaf/utils/springboot/test/utils/BasicSecurityConfigTest.java (renamed from eaaf-springboot-utils/src/test/java/at/gv/egiz/eaaf/utils/springboot/test/utils/BasicAuthUserTest.java)15
1 files changed, 13 insertions, 2 deletions
diff --git a/eaaf-springboot-utils/src/test/java/at/gv/egiz/eaaf/utils/springboot/test/utils/BasicAuthUserTest.java b/eaaf-springboot-utils/src/test/java/at/gv/egiz/eaaf/utils/springboot/test/utils/BasicSecurityConfigTest.java
index 95bd5dcb..83117253 100644
--- a/eaaf-springboot-utils/src/test/java/at/gv/egiz/eaaf/utils/springboot/test/utils/BasicAuthUserTest.java
+++ b/eaaf-springboot-utils/src/test/java/at/gv/egiz/eaaf/utils/springboot/test/utils/BasicSecurityConfigTest.java
@@ -9,13 +9,14 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.BlockJUnit4ClassRunner;
+import at.gv.egiz.eaaf.utils.springboot.security.AuthorizationConfiguration;
import at.gv.egiz.eaaf.utils.springboot.security.BasicAuthUser;
@RunWith(BlockJUnit4ClassRunner.class)
-public class BasicAuthUserTest {
+public class BasicSecurityConfigTest {
@Test
- public void simpleTest() {
+ public void userConfig() {
assertFalse("username",
BasicAuthUser.builder().password(rand()).role(rand()).build().isValid());
assertFalse("password",
@@ -33,6 +34,16 @@ public class BasicAuthUserTest {
}
+ @Test
+ public void authoriseConfig() {
+
+ assertEquals("endpoint size", 2,
+ AuthorizationConfiguration.builder().role(rand())
+ .endpoint(rand()).endpoint(rand()).build()
+ .getEndPointsArray().length);
+
+ }
+
private String rand() {
return RandomStringUtils.randomAlphanumeric(5);