mirror of
https://gitee.com/dromara/MaxKey.git
synced 2026-05-18 14:28:08 +08:00
springBootVersion =3.3.0
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user