From 03172735383c61b8482c889939bc5acac293e02a Mon Sep 17 00:00:00 2001 From: Yegor Bugayenko Date: Fri, 10 Nov 2023 08:56:22 +0300 Subject: [PATCH] #406 license --- s3auth-rest/pom.xml | 5 ++++ .../src/main/java/com/s3auth/rest/TkApp.java | 9 ++++++- s3auth-rest/src/main/resources/.DS_Store | Bin 0 -> 6148 bytes s3auth-rest/src/main/xsl/login.xsl | 23 +++++++++++++++++- 4 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 s3auth-rest/src/main/resources/.DS_Store diff --git a/s3auth-rest/pom.xml b/s3auth-rest/pom.xml index c8e55213..deb4d66c 100644 --- a/s3auth-rest/pom.xml +++ b/s3auth-rest/pom.xml @@ -60,6 +60,11 @@ OF THE POSSIBILITY OF SUCH DAMAGE. xembly 0.28.1 + + org.cactoos + cactoos + 0.55.0 + javax.json javax.json-api diff --git a/s3auth-rest/src/main/java/com/s3auth/rest/TkApp.java b/s3auth-rest/src/main/java/com/s3auth/rest/TkApp.java index a7c1ce28..7fc13db6 100644 --- a/s3auth-rest/src/main/java/com/s3auth/rest/TkApp.java +++ b/s3auth-rest/src/main/java/com/s3auth/rest/TkApp.java @@ -37,6 +37,9 @@ import java.util.regex.Pattern; import javax.validation.constraints.NotNull; import org.apache.commons.lang3.exception.ExceptionUtils; +import org.cactoos.io.ResourceOf; +import org.cactoos.text.TextOf; +import org.cactoos.text.UncheckedText; import org.takes.Response; import org.takes.Take; import org.takes.facets.auth.PsByFlag; @@ -271,7 +274,11 @@ private static Take regex(final Hosts hosts) { new FkRegex("/version", new TkText(TkApp.REV)), new FkRegex( "/license", - new TkText(TkApp.class.getResourceAsStream("/LICENSE.txt")) + new TkText( + new UncheckedText( + new TextOf(new ResourceOf("LICENSE.txt")) + ).asString() + ) ) ); } diff --git a/s3auth-rest/src/main/resources/.DS_Store b/s3auth-rest/src/main/resources/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..a3ffbd250c48bf3278bda11fb8232562c0078a20 GIT binary patch literal 6148 zcmeHK%}T>S5Z-O8Nhm@NiXIod7Hn%Rh?fxS3mDOZN=;~~!8BW%)E-J9SA8Mh#OHBl zcXJ39k0N#kcE8#A+0A^A{b7u8e=+JX<}$`?Xowt@4T9#4u9^u(@Y{D;%%&`46IT8Hk7$;}S>A4c@>;#Ivujz7)wCXiXSodWFkfVTIKRiyjg(1L z>S1&nkC#Jt|5B!T7^ma8N{B~e2zj`R(~(^Ia*>WQl^bY>3~aM6cgluO0i~_~hbx_>xRh`KEc~K)I4VgC)F!QYq;*n5T(MCtxpg%2+~TfEXYK zh=DC+z#Im4a|>&yl8FIg;AaMKe-O|RJ%fctwRJ#;*Jt!M5K%zKw*;av=ou_Df(L}_ zR6w1|%@c#`bg&B(=NT+C>U74{$}o>vxqQ5EwK~{^3TNEYNIfw?3{)AY>!FM1{}uc) z8z1@A6dDl&#K1pefHwxgz=xvD+4`+KJZlBCCuk@bSD*p{dgT%T1KdZBlvDc!>JaA{ WEHvUQXjkcgbP-U5P)7{>0s~+1J4@66 literal 0 HcmV?d00001 diff --git a/s3auth-rest/src/main/xsl/login.xsl b/s3auth-rest/src/main/xsl/login.xsl index 160094ad..2ac11c33 100644 --- a/s3auth-rest/src/main/xsl/login.xsl +++ b/s3auth-rest/src/main/xsl/login.xsl @@ -38,7 +38,28 @@ OF THE POSSIBILITY OF SUCH DAMAGE.

- To start, login using one of your accounts at: + To start, login using one of your accounts at + + + + + Facebook + + , + + + + + Google + + , or + + + + + Github + + :