Skip to content

Commit

Permalink
Merge pull request #12 from OSGP/feature/FDP-1897-spring-boot
Browse files Browse the repository at this point in the history
FDP-1897: Preparation for Spring Boot
  • Loading branch information
sanderv authored Feb 9, 2024
2 parents 84999b1 + 85149b8 commit c460c9b
Show file tree
Hide file tree
Showing 3 changed files with 523 additions and 493 deletions.
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ To sign a message, use `MessageSigner`'s `sign()` method: choose between `Signab

To verify a signature, use `MessageSigner`'s `verify()` method: choose between `SignableMessageWrapper` or `ProducerRecord`.

The `MessageSigner` class can be created with the following configuration options:
The `MessageSigner` class can be created using `MessageSigner.newBuilder()` with the following configuration options:
- signingEnabled
- stripAvroHeader
- signatureAlgorithm
Expand All @@ -49,6 +49,24 @@ The `MessageSigner` class can be created with the following configuration option
- signingKey: from `java.security.PrivateKey` object, from a byte array or from a pem file
- verificationKey: `from java.security.PrivateKey` object, from a byte array or from a pem file

### Spring Auto Configuration
You can configure the settings in your `application.yaml` (or properties), for example:
```yaml
message-signing:
enabled: true
strip-headers: true
signature:
algorithm: SHA256withRSA
provider: SunRsaSign
key:
algorithm: RSA
size: 2048
```
### Custom or multiple certificates configuration
You can create your own `MessageSigningProperties` object and use `MessageSigner.newMessageSigner(props)`.
Spring Boot users can extend the `MessageSigningProperties` to add @ConfigurationProperties capabilities and/or to support multiple configurations

## oauth-token-client
Library that easily configures the [msal4j](https://github.com/AzureAD/microsoft-authentication-library-for-java) oauth token provider.

Expand Down
Loading

0 comments on commit c460c9b

Please sign in to comment.