Skip to content

Commit

Permalink
#406 license
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Nov 10, 2023
1 parent a5d5076 commit 0317273
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 2 deletions.
5 changes: 5 additions & 0 deletions s3auth-rest/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ OF THE POSSIBILITY OF SUCH DAMAGE.
<artifactId>xembly</artifactId>
<version>0.28.1</version>
</dependency>
<dependency>
<groupId>org.cactoos</groupId>
<artifactId>cactoos</artifactId>
<version>0.55.0</version>
</dependency>
<dependency>
<groupId>javax.json</groupId>
<artifactId>javax.json-api</artifactId>
Expand Down
9 changes: 8 additions & 1 deletion s3auth-rest/src/main/java/com/s3auth/rest/TkApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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()
)
)
);
}
Expand Down
Binary file added s3auth-rest/src/main/resources/.DS_Store
Binary file not shown.
23 changes: 22 additions & 1 deletion s3auth-rest/src/main/xsl/login.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,28 @@ OF THE POSSIBILITY OF SUCH DAMAGE.
</xsl:template>
<xsl:template name="content">
<p>
<xsl:text>To start, login using one of your accounts at:</xsl:text>
<xsl:text>To start, login using one of your accounts at </xsl:text>
<a>
<xsl:attribute name="href">
<xsl:value-of select="/page/links/link[@rel='takes:facebook']/@href"/>
</xsl:attribute>
<xsl:text>Facebook</xsl:text>
</a>
<xsl:text>, </xsl:text>
<a>
<xsl:attribute name="href">
<xsl:value-of select="/page/links/link[@rel='takes:google']/@href"/>
</xsl:attribute>
<xsl:text>Google</xsl:text>
</a>
<xsl:text>, or </xsl:text>
<a>
<xsl:attribute name="href">
<xsl:value-of select="/page/links/link[@rel='takes:github']/@href"/>
</xsl:attribute>
<xsl:text>Github</xsl:text>
</a>
<xsl:text>:</xsl:text>
</p>
<p style="font-size: 2.5em;">
<a>
Expand Down

0 comments on commit 0317273

Please sign in to comment.