class CustomAuthorizationServiceIntrospector implements OpaqueTokenIntrospector {
    private final OAuth2AuthorizationService authorizationService;

    @Override
    public OAuth2AuthenticatedPrincipal introspect(String token) {<FILL_FUNCTION_BODY>}
}

        OAuth2Authorization authorization = authorizationService.findByToken(token, OAuth2TokenType.ACCESS_TOKEN);
        if (Objects.isNull(authorization)) {
            throw new InvalidBearerTokenException("invalid_token: " + token);
        }

        // 客户端模式默认返回
        if (AuthorizationGrantType.CLIENT_CREDENTIALS.equals(authorization.getAuthorizationGrantType())) {
            return new DefaultOAuth2AuthenticatedPrincipal(authorization.getPrincipalName()
                    , authorization.getAttributes(), AuthorityUtils.NO_AUTHORITIES);
        }

        String accountType = (String)authorization.getAttributes().get(SecurityConstants.ACCOUNT_TYPE_PARAM_NAME);
        Authentication authentication = (Authentication)authorization.getAttributes().get(Principal.class.getName());
        OAuth2AuthenticatedPrincipal principal = (OAuth2AuthenticatedPrincipal)authentication.getPrincipal();
        principal.getAttributes().put(SecurityConstants.CLIENT_ID, authorization.getRegisteredClientId());
        principal.getAttributes().put(SecurityConstants.ACCOUNT_TYPE_PARAM_NAME, accountType);

        return principal;
    
<no_super_class>