Skip to content

Commit 4fbcc59

Browse files
committed
Merge branch 'develop' into update-from-template-merged
2 parents 37e12e8 + 3366eea commit 4fbcc59

Some content is hidden

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

47 files changed

+2865
-51
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

+2-2
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

+1-1
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

+1-1
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

+2-2
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

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# 1.0.3
2+
* Updated dependencies
3+
* Abstracted code
4+
5+
# 1.0.2
6+
* Fix incorrect styling of ``main`` element on login screen
7+
8+
# 1.0.1
9+
* Fix NPE when ``additionalStylingData`` is not set
10+
11+
# 1.0.0
12+
<i>Initial release</i>
13+
* All methods and functionality are designed to be overwritable (at least protected)
14+
* The library consists of 2 main parts:
15+
* ``extendable`` → Includes the bare minimum to make the Spring components extendable
16+
* ``advanced`` → Contains components made on top of ``extendable`` with many customization options; Additionally:
17+
* Updated Bootstrap to version 5.3+
18+
* Improved SSO (OAuth2 / SAML2) UI

CONTRIBUTING.md

+2-2
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

+36-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,42 @@
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/).
734

835
## Installation
9-
[Installation guide for the latest release](https://github.com/xdev-software/template-placeholder/releases/latest#Installation)
36+
[Installation guide for the latest release](https://github.com/xdev-software/spring-security-advanced-authentication-ui/releases/latest#Installation)
37+
38+
> [!NOTE]
39+
> To minimize the risk of dependency conflicts all Spring (Boot) dependencies are declared as provided and are not shipped by default.
1040
1141
## Support
1242
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 +45,4 @@ If you need support as soon as possible and you can't wait for any pull request,
1545
See the [contributing guide](./CONTRIBUTING.md) for detailed instructions on how to get started with our project.
1646

1747
## 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)
48+
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

+1-1
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

36.9 KB
Loading

dev_infra/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
oidc-user-config.json

dev_infra/README.md

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
## Development Infrastructure
2+
3+
The infrastructure contains the following:
4+
* [Open ID Connect Mock Server](https://github.com/xdev-software/oidc-server-mock) - for login in
5+
* Available at http://localhost:4011
6+
7+
### Setup
8+
* Requires Docker
9+
10+
#### OIDC
11+
* Create ``oidc-user-config.json`` from [``oidc-user-config.json.template``](./oidc-user-config.json.template)
12+
* File should not be tracked in Git
13+
* Fill in your login details like mail, name, password
14+
15+
16+
### Usage
17+
Note: Commands are all executed inside a shell/CMD in the current folder. ([Tip for windows users](https://stackoverflow.com/a/40146208))
18+
19+
| Use case | What to do? |
20+
| --- | --- |
21+
| Starting the infrastructure | ``docker compose up`` |
22+
| Stopping (and removing) the infrastructure | ``docker compose down`` |
23+
| (Re)Building the infrastructure<br/>e.g. after changes to the Dockerfiles | ``docker compose build --pull`` |
24+
25+
See also ``docker compose --help``
26+
27+
### Additional notes
28+
⚠ The containers don't automatically restart after a PC restart!
29+
30+
⚠ After a PC restart the infrastructure is still present but it's stopped.<br/>
31+
In this case you have 2 options:
32+
* start the existing infrastructure again (``docker compose up``) or
33+
* do a clean start by first removing (``docker compose down``) and then starting the infrastructure

dev_infra/docker-compose.yml

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
version: "3"
2+
3+
services:
4+
# Docs: https://docs.duendesoftware.com
5+
oidc-server-mock:
6+
container_name: oidc-server-mock
7+
image: xdevsoftware/oidc-server-mock:1
8+
environment:
9+
ASPNETCORE_ENVIRONMENT: Development
10+
SERVER_OPTIONS_INLINE: |
11+
{
12+
"AccessTokenJwtType": "JWT",
13+
"Discovery": {
14+
"ShowKeySet": true
15+
},
16+
"Authentication": {
17+
"CookieSameSiteMode": "Lax",
18+
"CheckSessionCookieSameSiteMode": "Lax"
19+
}
20+
}
21+
LOGIN_OPTIONS_INLINE: |
22+
{
23+
"AllowRememberLogin": false
24+
}
25+
LOGOUT_OPTIONS_INLINE: |
26+
{
27+
"AutomaticRedirectAfterSignOut": true
28+
}
29+
USERS_CONFIGURATION_PATH: /tmp/config/oidc-user-config.json
30+
CLIENTS_CONFIGURATION_INLINE: |
31+
[
32+
{
33+
"ClientId": "client-id",
34+
"ClientSecrets": [
35+
"client-secret"
36+
],
37+
"Description": "TestClient",
38+
"AllowedGrantTypes": [
39+
"authorization_code",
40+
"refresh_token"
41+
],
42+
"RedirectUris": [
43+
"*"
44+
],
45+
"AllowedScopes": [
46+
"openid",
47+
"profile",
48+
"email",
49+
"offline_access"
50+
],
51+
"AlwaysIncludeUserClaimsInIdToken": true,
52+
"AllowOfflineAccess": true,
53+
"RequirePkce": false
54+
}
55+
]
56+
ASPNET_SERVICES_OPTIONS_INLINE: |
57+
{
58+
"ForwardedHeadersOptions": {
59+
"ForwardedHeaders" : "All"
60+
}
61+
}
62+
volumes:
63+
- ./oidc-user-config.json:/tmp/config/oidc-user-config.json:ro
64+
ports:
65+
- '4011:8080'
66+
deploy:
67+
resources:
68+
limits:
69+
memory: 512m
+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[
2+
{
3+
"SubjectId":"1",
4+
"Username":"[email protected]",
5+
"Password":"pwd",
6+
"Claims": [
7+
{
8+
"Type": "name",
9+
"Value": "Your name",
10+
"ValueType": "string"
11+
},
12+
{
13+
"Type": "email",
14+
"Value": "[email protected]",
15+
"ValueType": "string"
16+
}
17+
]
18+
}
19+
]

pom.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
<modelVersion>4.0.0</modelVersion>
66

77
<groupId>software.xdev</groupId>
8-
<artifactId>template-placeholder-root</artifactId>
9-
<version>1.0.0-SNAPSHOT</version>
8+
<artifactId>spring-security-advanced-authentication-ui-root</artifactId>
9+
<version>1.0.4-SNAPSHOT</version>
1010
<packaging>pom</packaging>
1111

1212
<organization>
@@ -15,8 +15,8 @@
1515
</organization>
1616

1717
<modules>
18-
<module>template-placeholder</module>
19-
<module>template-placeholder-demo</module>
18+
<module>spring-security-advanced-authentication-ui</module>
19+
<module>spring-security-advanced-authentication-ui-demo</module>
2020
</modules>
2121

2222
<properties>

renovate.json5

+11-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"packageRules": [
55
{
66
"description": "Ignore project internal dependencies",
7-
"packagePattern": "^software.xdev:template-placeholder",
7+
"packagePattern": "^software.xdev:spring-security-advanced-authentication-ui",
88
"datasources": [
99
"maven"
1010
],
@@ -19,6 +19,16 @@
1919
"maven"
2020
],
2121
"groupName": "net.sourceforge.pmd"
22+
},
23+
{
24+
"description": "Group Spring Boot",
25+
"matchPackagePatterns": [
26+
"^org.springframework.boot"
27+
],
28+
"datasources": [
29+
"maven"
30+
],
31+
"groupName": "org.springframework.boot"
2232
}
2333
]
2434
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Demo
2+
3+
* Start the [development infrastructure](../dev_infra/)
4+
* Run the application
5+
* Open ``http://localhost:8080``

0 commit comments

Comments
 (0)