Skip to content

Commit 7dc9947

Browse files
committed
Merge branch 'develop' into update-from-template-merged
2 parents c6cda5b + 280bcee commit 7dc9947

File tree

49 files changed

+3608
-113
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+3608
-113
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ body:
1515
attributes:
1616
label: "Checklist"
1717
options:
18-
- label: "I am able to reproduce the bug with the [latest version](https://github.com/xdev-software/template-placeholder/releases/latest)"
18+
- label: "I am able to reproduce the bug with the [latest version](https://github.com/xdev-software/spring-security-advanced-authentication-ui/releases/latest)"
1919
required: true
20-
- label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/template-placeholder/issues) or [closed](https://github.com/xdev-software/template-placeholder/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to."
20+
- label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/spring-security-advanced-authentication-ui/issues) or [closed](https://github.com/xdev-software/spring-security-advanced-authentication-ui/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to."
2121
required: true
2222
- label: "I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise."
2323
required: true

.github/ISSUE_TEMPLATE/enhancement.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ body:
1313
attributes:
1414
label: "Checklist"
1515
options:
16-
- label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/template-placeholder/issues) or [closed](https://github.com/xdev-software/template-placeholder/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to."
16+
- label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/spring-security-advanced-authentication-ui/issues) or [closed](https://github.com/xdev-software/spring-security-advanced-authentication-ui/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to."
1717
required: true
1818
- label: "I have taken the time to fill in all the required details. I understand that the feature request will be dismissed otherwise."
1919
required: true

.github/ISSUE_TEMPLATE/question.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ body:
1212
attributes:
1313
label: "Checklist"
1414
options:
15-
- label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/template-placeholder/issues) or [closed](https://github.com/xdev-software/template-placeholder/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to."
15+
- label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/spring-security-advanced-authentication-ui/issues) or [closed](https://github.com/xdev-software/spring-security-advanced-authentication-ui/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to."
1616
required: true
1717
- label: "I have taken the time to fill in all the required details. I understand that the question will be dismissed otherwise."
1818
required: true

.run/Run Demo.run.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<component name="ProjectRunConfigurationManager">
22
<configuration default="false" name="Run Demo" type="Application" factoryName="Application">
33
<option name="MAIN_CLASS_NAME" value="software.xdev.Application" />
4-
<module name="template-placeholder-demo" />
4+
<module name="spring-security-advanced-authentication-ui-demo" />
55
<option name="WORKING_DIRECTORY" value="$MODULE_DIR$" />
66
<extension name="coverage">
77
<pattern>
@@ -13,4 +13,4 @@
1313
<option name="Make" enabled="true" />
1414
</method>
1515
</configuration>
16-
</component>
16+
</component>

CHANGELOG.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# 2.0.0
2+
* Added support for Spring Security 6.4+ / Spring Boot 3.4+ #100
3+
* Spring now
4+
* uses a Regex-based templating system
5+
* no longer uses bootstrap
6+
* provides One-Time token/OTT and Passkey logins
7+
* Changes to ``Extendable``-subsystem
8+
* Now uses the new Regex-based templating system
9+
* Correct a bunch of problems in Spring Security including
10+
* One-Time token/OTT and Passkeys are ignored when computing if the whole filter is enabled
11+
* [Passkeys] Removed invalid XML comment in scripts block
12+
* [Passkeys] Fixed incorrectly closed HTML-form/div-tag
13+
* [HtmlTemplating] Compile ``UNUSED_PLACEHOLDER_PATTERN`` regex once and not for each request
14+
* [HtmlTemplating] Render: Optimization: Use entrySet instead of keySet + getValue
15+
* Add correct setter for ``generateOneTimeTokenUrl``
16+
* Improved naming of methods
17+
* Changes to ``Advanced``-subsystem
18+
* Keeps using Bootstrap
19+
* By default bootstrap is still loaded from ``cdn.jsdelivr.net`` but you can (and should) provide your own version
20+
* Keeps using the old templating system (without Regex)
21+
* Not all values are escaped by default as is with Spring's Regex based system
22+
* Usually they don't need to be escaped in the first place as they are set on the server side and can't be modified by a user
23+
* This is A LOT FASTER (in tests around 50x) than Spring's new Regex based system
24+
* Adopted changes; Added new configuration options
25+
* [Passkeys] Fixed a problem where more than one header results in invalid generated JavaScript code
26+
27+
# 1.0.3
28+
* Updated dependencies
29+
* Abstracted code
30+
31+
# 1.0.2
32+
* Fix incorrect styling of ``main`` element on login screen
33+
34+
# 1.0.1
35+
* Fix NPE when ``additionalStylingData`` is not set
36+
37+
# 1.0.0
38+
<i>Initial release</i>
39+
* All methods and functionality are designed to be overwritable (at least protected)
40+
* The library consists of 2 main parts:
41+
* ``extendable`` → Includes the bare minimum to make the Spring components extendable
42+
* ``advanced`` → Contains components made on top of ``extendable`` with many customization options; Additionally:
43+
* Updated Bootstrap to version 5.3+
44+
* Improved SSO (OAuth2 / SAML2) UI

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ You should have the following things installed:
3434
* Ensure that the JDK/Java-Version is correct
3535

3636

37-
## Releasing [![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/template-placeholder/release.yml?branch=master)](https://github.com/xdev-software/template-placeholder/actions/workflows/release.yml)
37+
## Releasing [![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/spring-security-advanced-authentication-ui/release.yml?branch=master)](https://github.com/xdev-software/spring-security-advanced-authentication-ui/actions/workflows/release.yml)
3838

3939
Before releasing:
40-
* Consider doing a [test-deployment](https://github.com/xdev-software/template-placeholder/actions/workflows/test-deploy.yml?query=branch%3Adevelop) before actually releasing.
40+
* Consider doing a [test-deployment](https://github.com/xdev-software/spring-security-advanced-authentication-ui/actions/workflows/test-deploy.yml?query=branch%3Adevelop) before actually releasing.
4141
* Check the [changelog](CHANGELOG.md)
4242

4343
If the ``develop`` is ready for release, create a pull request to the ``master``-Branch and merge the changes

README.md

Lines changed: 47 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,53 @@
1-
[![Latest version](https://img.shields.io/maven-central/v/software.xdev/template-placeholder?logo=apache%20maven)](https://mvnrepository.com/artifact/software.xdev/template-placeholder)
2-
[![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/template-placeholder/check-build.yml?branch=develop)](https://github.com/xdev-software/template-placeholder/actions/workflows/check-build.yml?query=branch%3Adevelop)
3-
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=xdev-software_template-placeholder&metric=alert_status)](https://sonarcloud.io/dashboard?id=xdev-software_template-placeholder)
1+
[![Latest version](https://img.shields.io/maven-central/v/software.xdev/spring-security-advanced-authentication-ui?logo=apache%20maven)](https://mvnrepository.com/artifact/software.xdev/spring-security-advanced-authentication-ui)
2+
[![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/spring-security-advanced-authentication-ui/check-build.yml?branch=develop)](https://github.com/xdev-software/spring-security-advanced-authentication-ui/actions/workflows/check-build.yml?query=branch%3Adevelop)
3+
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=xdev-software_spring-security-advanced-authentication-ui&metric=alert_status)](https://sonarcloud.io/dashboard?id=xdev-software_spring-security-advanced-authentication-ui)
44

5-
# template-placeholder
5+
# spring-security-advanced-authentication-ui
66

7+
Modernizes the default Spring Web Authentication/Login UI and makes it easier customizable.
8+
9+
<details><summary>Show demo</summary>
10+
11+
<p align="center">
12+
<img src="./assets/demo.png" alt="Demo" />
13+
</p>
14+
15+
</details>
16+
17+
## Usage
18+
19+
The library provides an adapter that can be used like this:
20+
```java
21+
public SecurityFilterChain configure(final HttpSecurity http) throws Exception
22+
{
23+
// Changing the text "Login with" to "Sign in with"
24+
http.with(new AdvancedLoginPageAdapter<>(http), c -> c
25+
.customizeLoginPage(p -> p.ssoLoginHeaderText("Sign in with")))
26+
.oauth2Login(c ->
27+
// ...
28+
)
29+
// ...
30+
}
31+
```
32+
33+
A more detailed scenario is available in the [demo](./spring-security-advanced-authentication-ui-demo/).
34+
35+
> [!NOTE]
36+
> By default [Bootstrap](https://github.com/twbs/bootstrap) is loaded from ``cdn.jsdelivr.net``.<br/>
37+
> Due to privacy and stability reasons you should ship your own version!<br/>
38+
> An example how this can be done is shown in the [demo](https://github.com/xdev-software/spring-security-advanced-authentication-ui/blob/4117d471e036de4dc2a58b2b484f2631afe7af50/spring-security-advanced-authentication-ui-demo/src/main/java/software/xdev/security/MainWebSecurity.java#L44-L51).
39+
40+
> [!NOTE]
41+
> The ``Advanced``-subsystem uses the pre-``Spring Security 6.4`` / ``Spring Boot 3.4`` templating system (without Regex).<br/>
42+
> * In contrast to Spring's new Regex based system not all values are escaped by default
43+
> * Usually they don't need to be escaped in the first place as they are set on the server side and can't be modified by a user
44+
> * This is A LOT FASTER (in tests around 50x) than Spring's new Regex based system
745
846
## Installation
9-
[Installation guide for the latest release](https://github.com/xdev-software/template-placeholder/releases/latest#Installation)
47+
[Installation guide for the latest release](https://github.com/xdev-software/spring-security-advanced-authentication-ui/releases/latest#Installation)
48+
49+
> [!NOTE]
50+
> To minimize the risk of dependency conflicts all Spring (Boot) dependencies are declared as provided and are not shipped by default.
1051
1152
## Support
1253
If you need support as soon as possible and you can't wait for any pull request, feel free to use [our support](https://xdev.software/en/services/support).
@@ -15,4 +56,4 @@ If you need support as soon as possible and you can't wait for any pull request,
1556
See the [contributing guide](./CONTRIBUTING.md) for detailed instructions on how to get started with our project.
1657

1758
## Dependencies and Licenses
18-
View the [license of the current project](LICENSE) or the [summary including all dependencies](https://xdev-software.github.io/template-placeholder/dependencies)
59+
View the [license of the current project](LICENSE) or the [summary including all dependencies](https://xdev-software.github.io/spring-security-advanced-authentication-ui/dependencies)

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
## Reporting a Vulnerability
44

5-
Please report a security vulnerability [on GitHub Security Advisories](https://github.com/xdev-software/template-placeholder/security/advisories/new).
5+
Please report a security vulnerability [on GitHub Security Advisories](https://github.com/xdev-software/spring-security-advanced-authentication-ui/security/advisories/new).

assets/demo.png

55.9 KB
Loading

dev_infra/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
oidc-user-config.json

0 commit comments

Comments
 (0)