|
6 | 6 | import java.util.OptionalLong;
|
7 | 7 |
|
8 | 8 | import io.quarkus.runtime.annotations.ConfigGroup;
|
9 |
| -import io.quarkus.runtime.annotations.ConfigItem; |
| 9 | +import io.smallrye.config.WithDefault; |
10 | 10 |
|
11 | 11 | @ConfigGroup
|
12 |
| -public class DkimSignOptionsConfig { |
| 12 | +public interface DkimSignOptionsConfig { |
13 | 13 |
|
14 | 14 | /**
|
15 | 15 | * Enables DKIM signing.
|
16 | 16 | */
|
17 |
| - @ConfigItem(defaultValue = "false") |
18 |
| - public boolean enabled; |
| 17 | + @WithDefault("false") |
| 18 | + boolean enabled(); |
19 | 19 |
|
20 | 20 | /**
|
21 | 21 | * Configures the PKCS#8 format private key used to sign the email.
|
22 | 22 | */
|
23 |
| - @ConfigItem |
24 |
| - public Optional<String> privateKey = Optional.empty(); |
| 23 | + Optional<String> privateKey(); |
25 | 24 |
|
26 | 25 | /**
|
27 | 26 | * Configures the PKCS#8 format private key file path.
|
28 | 27 | */
|
29 |
| - @ConfigItem |
30 |
| - public Optional<String> privateKeyPath = Optional.empty(); |
| 28 | + Optional<String> privateKeyPath(); |
31 | 29 |
|
32 | 30 | /**
|
33 | 31 | * Configures the Agent or User Identifier (AUID).
|
34 | 32 | */
|
35 |
| - @ConfigItem |
36 |
| - public Optional<String> auid = Optional.empty(); |
| 33 | + Optional<String> auid(); |
37 | 34 |
|
38 | 35 | /**
|
39 | 36 | * Configures the selector used to query the public key.
|
40 | 37 | */
|
41 |
| - @ConfigItem |
42 |
| - public Optional<String> selector = Optional.empty(); |
| 38 | + Optional<String> selector(); |
43 | 39 |
|
44 | 40 | /**
|
45 | 41 | * Configures the Signing Domain Identifier (SDID).
|
46 | 42 | */
|
47 |
| - @ConfigItem |
48 |
| - public Optional<String> sdid = Optional.empty(); |
| 43 | + Optional<String> sdid(); |
49 | 44 |
|
50 | 45 | /**
|
51 | 46 | * Configures the canonicalization algorithm for signed headers.
|
52 | 47 | */
|
53 |
| - @ConfigItem |
54 |
| - public Optional<CanonicalizationAlgorithmOption> headerCanonAlgo = Optional.empty(); |
| 48 | + Optional<CanonicalizationAlgorithmOption> headerCanonAlgo(); |
55 | 49 |
|
56 | 50 | /**
|
57 | 51 | * Configures the canonicalization algorithm for mail body.
|
58 | 52 | */
|
59 |
| - @ConfigItem |
60 |
| - public Optional<CanonicalizationAlgorithmOption> bodyCanonAlgo = Optional.empty(); |
| 53 | + Optional<CanonicalizationAlgorithmOption> bodyCanonAlgo(); |
61 | 54 |
|
62 | 55 | /**
|
63 | 56 | * Configures the body limit to sign.
|
64 | 57 | *
|
65 | 58 | * Must be greater than zero.
|
66 | 59 | */
|
67 |
| - @ConfigItem |
68 |
| - public OptionalInt bodyLimit = OptionalInt.empty(); |
| 60 | + OptionalInt bodyLimit(); |
69 | 61 |
|
70 | 62 | /**
|
71 | 63 | * Configures to enable or disable signature sign timestamp.
|
72 | 64 | */
|
73 |
| - @ConfigItem |
74 |
| - public Optional<Boolean> signatureTimestamp = Optional.empty(); |
| 65 | + Optional<Boolean> signatureTimestamp(); |
75 | 66 |
|
76 | 67 | /**
|
77 | 68 | * Configures the expire time in seconds when the signature sign will be expired.
|
78 | 69 | *
|
79 | 70 | * Must be greater than zero.
|
80 | 71 | */
|
81 |
| - @ConfigItem |
82 |
| - public OptionalLong expireTime = OptionalLong.empty(); |
| 72 | + OptionalLong expireTime(); |
83 | 73 |
|
84 | 74 | /**
|
85 | 75 | * Configures the signed headers in DKIM, separated by commas.
|
86 | 76 | *
|
87 | 77 | * The order in the list matters.
|
88 | 78 | */
|
89 |
| - @ConfigItem |
90 |
| - public Optional<List<String>> signedHeaders = Optional.empty(); |
| 79 | + Optional<List<String>> signedHeaders(); |
91 | 80 |
|
92 | 81 | public enum CanonicalizationAlgorithmOption {
|
93 | 82 | SIMPLE,
|
|
0 commit comments