Skip to content

Commit

Permalink
prepare release v2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sephiroth-j committed Nov 24, 2022
1 parent 4a22fa2 commit 1d9b5e9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@

## Unreleased
### ⚠ Breaking
### ⭐ New Features
### 🐞 Bugs Fixed

## v2.0.0 - 2022-??-??
### ⚠ Breaking
- requires Spring Security 6.0+
- requires Jakarta Servlet™ 5.0 / Jakarta EE 9+ (`jakarta.*` Namespace)
- requires Jakarta Servlet™ 6.0 / Jakarta EE 9+ (`jakarta.*` Namespace)
- requires Java 17+

### ⭐ New Features
Expand Down
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ curl -i -b "My-Auth-Cookie=<token-value>" http://localhost:8080/hello

An absolute minimum requirement for configuration are the shared secret key needed for decrypting the token and, in order to verify its signature, the public key from the identity provider that created the token.

## Version Compatibility Matrix
Spring Security LTPA2 | Spring Security | Java
--------------------- | --------------- | ----
2.0.x (current) | 6.x | 17+
1.1.x | 5.x | 8+

## Usage
Checkout the [servlet sample project](https://github.com/sephiroth-j/spring-security-ltpa2-sample) or [reactive sample project](https://github.com/sephiroth-j/spring-security-ltpa2-reactive-sample) for a complete example.

Expand All @@ -40,7 +46,7 @@ Add the library as an dependency together with your Spring Security dependencies
<dependency>
<groupId>de.sephiroth-j</groupId>
<artifactId>spring-security-ltpa2</artifactId>
<version>[1.0.0,)</version>
<version>[2.0.0,)</version>
</dependency>
</dependencies>

Expand All @@ -67,9 +73,11 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter
protected void configure(HttpSecurity http) throws Exception
{
http
.authorizeRequests()
.antMatchers("/", "/home").permitAll()
.antMatchers("/hello").hasRole("USER")
.authorizeHttpRequests()
.requestMatchers("/", "/home").permitAll()
.requestMatchers("/hello").hasRole("DEVELOPERS")
// all other require any authentication
.anyRequest().authenticated()
.and()
// configure LTPA2 Support
.apply(new Ltpa2Configurer())
Expand Down

0 comments on commit 1d9b5e9

Please sign in to comment.