public static OAuth2AuthorizationService getAuthorizationService(HttpSecurity httpSecurity) {
        OAuth2AuthorizationService authorizationService = httpSecurity.getSharedObject(OAuth2AuthorizationService.class);
        if (authorizationService == null) {
            authorizationService = getOptionalBean(httpSecurity, OAuth2AuthorizationService.class);
            if (authorizationService == null) {
                authorizationService = new InMemoryOAuth2AuthorizationService();
            }
            httpSecurity.setSharedObject(OAuth2AuthorizationService.class, authorizationService);
        }
        return authorizationService;
    }
@author: zlt
@date: 2023/11/16
<p>
Blog: https://zlt2000.gitee.io
Github: https://github.com/zlt2000
zlt-commons/zlt-auth-client-spring-boot-starter/src/main/java/com/central/oauth2/common/util/OAuth2ConfigurerUtils.java