docs: @Override
      public AuthorizationRequest createAuthorizationRequest(Map<String, String> authorizationParameters) {
  
          String clientId = authorizationParameters.get("client_id");
          BaseClientDetails clientDetails = (BaseClientDetails)clientDetailsService.loadClientByClientId(clientId, IdentityZoneHolder.get().getId());
          validateParameters(authorizationParameters, clientDetails);
          Set<String> scopes = OAuth2Utils.parseParameterList(authorizationParameters.get(OAuth2Utils.SCOPE));
          Set<String> responseTypes = OAuth2Utils.parseParameterList(authorizationParameters.get(OAuth2Utils.RESPONSE_TYPE));
          String state = authorizationParameters.get(OAuth2Utils.STATE);
          String redirectUri = authorizationParameters.get(OAuth2Utils.REDIRECT_URI);
          if (scopes == null || scopes.isEmpty()) {
                  // The default for a user token is the requestedScopes registered with the client
                  scopes = clientDetails.getScope();
          }
  
          if (securityContextAccessor.isUser()) {
              String userId = securityContextAccessor.getUserId();
              UaaUser uaaUser = uaaUserDatabase.retrieveUserById(userId);
              Collection<? extends GrantedAuthority> authorities = uaaUser.getAuthorities();
              //validate scopes
              scopes = checkUserScopes(scopes, authorities, clientDetails);
              //check client IDP relationship - allowed providers
              checkClientIdpAuthorization(clientDetails, uaaUser);
          }
  
          Set<String> resourceIds = getResourceIds(clientDetails, scopes);
          clientDetails.setResourceIds(resourceIds);
          Map<String, String> actualParameters = new HashMap<>(authorizationParameters);
          AuthorizationRequest request = new AuthorizationRequest(
              actualParameters,
              null,
              clientId,
              scopes.isEmpty()?null:scopes,
              null,
              null,
              false,
              state,
              redirectUri,
              responseTypes
          );
          if (!scopes.isEmpty()) {
              request.setScope(scopes);
          }
  
          request.setResourceIdsAndAuthoritiesFromClientDetails(clientDetails);
  
          return request;
      }