diff --git a/README.md b/README.md index 3b0f6e6b708917e287fd7746819c9d0ee465a093..f7bd5f1f5154e453e3442081519150d9d7d1cb05 100644 --- a/README.md +++ b/README.md @@ -14,10 +14,12 @@ AuthSch Java API <dependency> <groupId>com.google.code.gson</groupId> <artifactId>gson</artifactId> - <version>2.8.0</version> + <version>2.8.2</version> </dependency> ``` +If you're using a web container, you might need to put a [gson-2.8.2.jar](https://repo1.maven.org/maven2/com/google/code/gson/gson/2.8.2/) into the `WEB_INF/lib` folder. + ### Initialize ```java @@ -69,7 +71,7 @@ TODO ## License -** "THE BEER-WARE LICENSE" (Revision 42): ** <br> + "THE BEER-WARE LICENSE" (Revision 42): <br> <br> <gerviba@gerviba.hu> wrote this file. As long as you retain this notice you <br> can do whatever you want with this stuff. If we meet some day, and you think <br> diff --git a/src/main/java/hu/gerviba/authsch/response/AuthResponse.java b/src/main/java/hu/gerviba/authsch/response/AuthResponse.java index f84aa2d75bc28cfeef522808bc6eb0817ae33278..2db167536fe7e9788c83828620d1141ef32af92e 100644 --- a/src/main/java/hu/gerviba/authsch/response/AuthResponse.java +++ b/src/main/java/hu/gerviba/authsch/response/AuthResponse.java @@ -14,6 +14,9 @@ import java.util.List; import hu.gerviba.authsch.struct.Scope; +/** + * @author Gerviba + */ public final class AuthResponse implements Serializable { private static final long serialVersionUID = 4140354200501250401L; diff --git a/src/main/java/hu/gerviba/authsch/struct/BMEUnitScope.java b/src/main/java/hu/gerviba/authsch/struct/BMEUnitScope.java index 3c81c34a499550aade26aae1d1debe96b0a3a789..a2046442ac106cd701cb1bc5ec7e8a03b8deef89 100644 --- a/src/main/java/hu/gerviba/authsch/struct/BMEUnitScope.java +++ b/src/main/java/hu/gerviba/authsch/struct/BMEUnitScope.java @@ -9,6 +9,9 @@ */ package hu.gerviba.authsch.struct; +/** + * @author Gerviba + */ public enum BMEUnitScope { BME(true, false, false, false), BME_VIK(true, true, false, false), diff --git a/src/main/java/hu/gerviba/authsch/struct/Entrant.java b/src/main/java/hu/gerviba/authsch/struct/Entrant.java index 55cb8d5ff01464fbb920dd8b818362e250c34f62..134ca886d9de2db80b3d4df0d5a091b5baa0d833 100644 --- a/src/main/java/hu/gerviba/authsch/struct/Entrant.java +++ b/src/main/java/hu/gerviba/authsch/struct/Entrant.java @@ -11,6 +11,9 @@ package hu.gerviba.authsch.struct; import java.io.Serializable; +/** + * @author Gerviba + */ public class Entrant implements Serializable { private static final long serialVersionUID = 461763126385555164L; diff --git a/src/main/java/hu/gerviba/authsch/struct/PersonEntitlement.java b/src/main/java/hu/gerviba/authsch/struct/PersonEntitlement.java index fd6439b00bc14170729f1510169b9696a663900d..4c5e4af9cd15782094882a99f8d49cc9f6b962bd 100644 --- a/src/main/java/hu/gerviba/authsch/struct/PersonEntitlement.java +++ b/src/main/java/hu/gerviba/authsch/struct/PersonEntitlement.java @@ -11,6 +11,9 @@ package hu.gerviba.authsch.struct; import java.io.Serializable; +/** + * @author Gerviba + */ public class PersonEntitlement implements Serializable { private static final long serialVersionUID = -2904767686389619156L; diff --git a/src/test/java/hu/gerviba/authsch/AuthResponseTest.java b/src/test/java/hu/gerviba/authsch/AuthResponseTest.java index 6345149d6a1a5c0a19e7f4f4efd829700a93bf7c..3044d43f1ee295aa2c42eeb989d6c196362562c0 100644 --- a/src/test/java/hu/gerviba/authsch/AuthResponseTest.java +++ b/src/test/java/hu/gerviba/authsch/AuthResponseTest.java @@ -1,5 +1,14 @@ package hu.gerviba.authsch; +/** + * + * "THE BEER-WARE LICENSE" (Revision 42): + * + * <gerviba@gerviba.hu> wrote this file. As long as you retain this notice you + * can do whatever you want with this stuff. If we meet some day, and you think + * this stuff is worth it, you can buy me a beer in return. Szabó Gergely + * + */ import static org.junit.Assert.*; import java.util.Arrays; diff --git a/src/test/java/hu/gerviba/authsch/AuthSchAPITest.java b/src/test/java/hu/gerviba/authsch/AuthSchAPITest.java index af72942f50ff3e055dc9b3fbbe4fbbb904b108fd..9a0bb2865529988f5cfe1201e72687a602268c25 100644 --- a/src/test/java/hu/gerviba/authsch/AuthSchAPITest.java +++ b/src/test/java/hu/gerviba/authsch/AuthSchAPITest.java @@ -1,3 +1,12 @@ +/** + * + * "THE BEER-WARE LICENSE" (Revision 42): + * + * <gerviba@gerviba.hu> wrote this file. As long as you retain this notice you + * can do whatever you want with this stuff. If we meet some day, and you think + * this stuff is worth it, you can buy me a beer in return. Szabó Gergely + * + */ package hu.gerviba.authsch; import static org.junit.Assert.*; diff --git a/src/test/java/hu/gerviba/authsch/ProfileResponseTest.java b/src/test/java/hu/gerviba/authsch/ProfileResponseTest.java index 8ba20a8d81e61e9075cac4ded5647c5d7464eea9..2f7d6199f1bbfe1bc18c3ca212c4fd0e0917d900 100644 --- a/src/test/java/hu/gerviba/authsch/ProfileResponseTest.java +++ b/src/test/java/hu/gerviba/authsch/ProfileResponseTest.java @@ -1,3 +1,12 @@ +/** + * + * "THE BEER-WARE LICENSE" (Revision 42): + * + * <gerviba@gerviba.hu> wrote this file. As long as you retain this notice you + * can do whatever you want with this stuff. If we meet some day, and you think + * this stuff is worth it, you can buy me a beer in return. Szabó Gergely + * + */ package hu.gerviba.authsch; import static org.junit.Assert.assertEquals; @@ -55,10 +64,10 @@ public class ProfileResponseTest { assertEquals("KB", profile.getEntrants().get(0).getEntrantType()); assertEquals(Arrays.asList("BMEGT42A001", "BMEGT52A001", "BMEGT70BS2B"), profile.getCourses()); - assertEquals(Arrays.asList("junit@sch.hu", "juint@balu.sch.bme.hu", "LinuxTerminal", "CERTSVC_DCOM_ACCESS", "Users"), - profile.getADMemberships()); - assertEquals(Arrays.asList(BMEUnitScope.BME, BMEUnitScope.BME_ACTIVE, BMEUnitScope.BME_VIK, BMEUnitScope.BME_VIK_ACTIVE), - profile.getBmeUnitScopes()); + assertEquals(Arrays.asList("junit@sch.hu", "juint@balu.sch.bme.hu", "LinuxTerminal", + "CERTSVC_DCOM_ACCESS", "Users"), profile.getADMemberships()); + assertEquals(Arrays.asList(BMEUnitScope.BME, BMEUnitScope.BME_ACTIVE, BMEUnitScope.BME_VIK, + BMEUnitScope.BME_VIK_ACTIVE), profile.getBmeUnitScopes()); } @Test diff --git a/src/test/java/hu/gerviba/authsch/struct/ScopeTest.java b/src/test/java/hu/gerviba/authsch/struct/ScopeTest.java index de5a98bb26c0d3ac35397bd3ead2d2db7a7fa5fd..095ceeee4c55ecc9eba582e774abf76d26bd3b91 100644 --- a/src/test/java/hu/gerviba/authsch/struct/ScopeTest.java +++ b/src/test/java/hu/gerviba/authsch/struct/ScopeTest.java @@ -1,3 +1,12 @@ +/** + * + * "THE BEER-WARE LICENSE" (Revision 42): + * + * <gerviba@gerviba.hu> wrote this file. As long as you retain this notice you + * can do whatever you want with this stuff. If we meet some day, and you think + * this stuff is worth it, you can buy me a beer in return. Szabó Gergely + * + */ package hu.gerviba.authsch.struct; import static org.junit.Assert.*; @@ -32,7 +41,7 @@ public class ScopeTest { @Test public void testListFromString() throws Exception { - assertEquals(Arrays.asList(Scope.BASIC, Scope.GIVEN_NAME, Scope.ACTIVE_DIRECTORY_MEMBERSHIP), + assertEquals(Arrays.asList(Scope.BASIC, Scope.GIVEN_NAME, Scope.ACTIVE_DIRECTORY_MEMBERSHIP), Scope.listFromString(" ", "basic givenName admembership")); }