springBootVersion =3.3.0

This commit is contained in:
MaxKey
2024-06-03 15:07:38 +08:00
parent e8057b4661
commit aed97e114f
11 changed files with 52 additions and 32 deletions

View File

@@ -47,9 +47,9 @@ public class AuthnProviderAutoConfiguration {
@Bean
public AbstractAuthenticationProvider authenticationProvider(
AbstractAuthenticationProvider normalAuthenticationProvider,
AbstractAuthenticationProvider mobileAuthenticationProvider,
AbstractAuthenticationProvider trustedAuthenticationProvider
NormalAuthenticationProvider normalAuthenticationProvider,
MobileAuthenticationProvider mobileAuthenticationProvider,
TrustedAuthenticationProvider trustedAuthenticationProvider
) {
AuthenticationProviderFactory authenticationProvider = new AuthenticationProviderFactory();
authenticationProvider.addAuthenticationProvider(normalAuthenticationProvider);
@@ -60,7 +60,7 @@ public class AuthnProviderAutoConfiguration {
}
@Bean
public AbstractAuthenticationProvider normalAuthenticationProvider(
public NormalAuthenticationProvider normalAuthenticationProvider(
AbstractAuthenticationRealm authenticationRealm,
ApplicationConfig applicationConfig,
SessionManager sessionManager,
@@ -76,7 +76,7 @@ public class AuthnProviderAutoConfiguration {
}
@Bean
public AbstractAuthenticationProvider mobileAuthenticationProvider(
public MobileAuthenticationProvider mobileAuthenticationProvider(
AbstractAuthenticationRealm authenticationRealm,
ApplicationConfig applicationConfig,
SmsOtpAuthnService smsAuthnService,
@@ -92,7 +92,7 @@ public class AuthnProviderAutoConfiguration {
}
@Bean
public AbstractAuthenticationProvider trustedAuthenticationProvider(
public TrustedAuthenticationProvider trustedAuthenticationProvider(
AbstractAuthenticationRealm authenticationRealm,
ApplicationConfig applicationConfig,
SessionManager sessionManager

View File

@@ -26,6 +26,7 @@ import org.dromara.maxkey.crypto.jose.keystore.JWKSetKeyStore;
import org.dromara.maxkey.crypto.jwt.signer.service.impl.DefaultJwtSigningAndValidationService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.context.annotation.Bean;
@@ -58,7 +59,7 @@ public class JwtAuthnAutoConfiguration {
*/
@Bean
public DefaultJwtSigningAndValidationService jwtLoginValidationService(
JWKSetKeyStore jwtLoginJwkSetKeyStore)
@Qualifier("jwtLoginJwkSetKeyStore") JWKSetKeyStore jwtLoginJwkSetKeyStore)
throws NoSuchAlgorithmException, InvalidKeySpecException, JOSEException {
DefaultJwtSigningAndValidationService jwtSignerValidationService =
new DefaultJwtSigningAndValidationService(jwtLoginJwkSetKeyStore);
@@ -76,6 +77,7 @@ public class JwtAuthnAutoConfiguration {
public JwtLoginService jwtLoginService(
@Value("${maxkey.login.jwt.issuer}")
String issuer,
@Qualifier("jwtLoginValidationService")
DefaultJwtSigningAndValidationService jwtLoginValidationService) {
JwtLoginService jwtLoginService = new JwtLoginService(
jwtLoginValidationService,