@@ -77,6 +77,25 @@ public ChallengeNonceGenerator generator(ChallengeNonceStore challengeNonceStore
77
77
.build ();
78
78
}
79
79
80
+ @ Bean
81
+ public AuthTokenValidator validator (YAMLConfig yamlConfig ) {
82
+ try {
83
+ return new AuthTokenValidatorBuilder ()
84
+ .withSiteOrigin (URI .create (yamlConfig .getLocalOrigin ()))
85
+ .withTrustedCertificateAuthorities (loadTrustedCACertificatesFromCerFiles ())
86
+ .withTrustedCertificateAuthorities (loadTrustedCACertificatesFromTrustStore (yamlConfig ))
87
+ .withOcspRequestTimeout (yamlConfig .getOcspRequestTimeout ())
88
+ .build ();
89
+ } catch (JceException e ) {
90
+ throw new RuntimeException ("Error building the Web eID auth token validator." , e );
91
+ }
92
+ }
93
+
94
+ @ Bean
95
+ public YAMLConfig yamlConfig () {
96
+ return new YAMLConfig ();
97
+ }
98
+
80
99
private X509Certificate [] loadTrustedCACertificatesFromCerFiles () {
81
100
List <X509Certificate > caCertificates = new ArrayList <>();
82
101
@@ -121,23 +140,6 @@ private X509Certificate[] loadTrustedCACertificatesFromTrustStore(YAMLConfig yam
121
140
return caCertificates .toArray (new X509Certificate [0 ]);
122
141
}
123
142
124
- @ Bean
125
- public AuthTokenValidator validator (YAMLConfig yamlConfig ) {
126
- try {
127
- return new AuthTokenValidatorBuilder ()
128
- .withSiteOrigin (URI .create (yamlConfig .getLocalOrigin ()))
129
- .withTrustedCertificateAuthorities (loadTrustedCACertificatesFromCerFiles ())
130
- .withTrustedCertificateAuthorities (loadTrustedCACertificatesFromTrustStore (yamlConfig ))
131
- .withOcspRequestTimeout (yamlConfig .getOcspRequestTimeout ())
132
- .build ();
133
- } catch (JceException e ) {
134
- throw new RuntimeException ("Error building the Web eID auth token validator." , e );
135
- }
136
- }
137
143
138
- @ Bean
139
- public YAMLConfig yamlConfig () {
140
- return new YAMLConfig ();
141
- }
142
144
143
145
}
0 commit comments