1+ // Licensed to the Apache Software Foundation (ASF) under one
2+ // or more contributor license agreements. See the NOTICE file
3+ // distributed with this work for additional information
4+ // regarding copyright ownership. The ASF licenses this file
5+ // to you under the Apache License, Version 2.0 (the
6+ // "License"); you may not use this file except in compliance
7+ // with the License. You may obtain a copy of the License at
8+ //
9+ // http://www.apache.org/licenses/LICENSE-2.0
10+ //
11+ // Unless required by applicable law or agreed to in writing,
12+ // software distributed under the License is distributed on an
13+ // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+ // KIND, either express or implied. See the License for the
15+ // specific language governing permissions and limitations
16+ // under the License.
17+
118package org .apache .doris .http .controller ;
219
3- import com .google .common .base .Preconditions ;
4- import com .google .common .base .Strings ;
5- import com .google .common .collect .Lists ;
620import org .apache .doris .analysis .CompoundPredicate ;
721import org .apache .doris .analysis .UserIdentity ;
822import org .apache .doris .catalog .Catalog ;
923import org .apache .doris .cluster .ClusterNamespace ;
1024import org .apache .doris .http .HttpAuthManager ;
25+ import org .apache .doris .http .HttpAuthManager .SessionValue ;
1126import org .apache .doris .http .exception .UnauthorizedException ;
1227import org .apache .doris .mysql .privilege .PaloPrivilege ;
1328import org .apache .doris .mysql .privilege .PrivBitSet ;
1429import org .apache .doris .mysql .privilege .PrivPredicate ;
1530import org .apache .doris .qe .ConnectContext ;
1631import org .apache .doris .system .SystemInfoService ;
17- import org .apache .doris .http .HttpAuthManager .SessionValue ;
32+
33+ import com .google .common .base .Preconditions ;
34+ import com .google .common .base .Strings ;
35+ import com .google .common .collect .Lists ;
1836
1937import org .apache .logging .log4j .LogManager ;
2038import org .apache .logging .log4j .Logger ;
2139
22- import javax .servlet .http .Cookie ;
23- import javax .servlet .http .HttpServletRequest ;
24- import javax .servlet .http .HttpServletResponse ;
2540import java .util .HashMap ;
2641import java .util .List ;
2742import java .util .Map ;
2843import java .util .UUID ;
2944
45+ import javax .servlet .http .Cookie ;
46+ import javax .servlet .http .HttpServletRequest ;
47+ import javax .servlet .http .HttpServletResponse ;
48+
3049public class BaseController {
3150
3251 private static final Logger LOG = LogManager .getLogger (BaseController .class );
@@ -122,7 +141,6 @@ public String getCookieValue(HttpServletRequest request, String cookieName, Http
122141 return null ;
123142 }
124143
125-
126144 public void updateCookieAge (HttpServletRequest request , String cookieName , int age ,HttpServletResponse response ) {
127145 Cookie [] cookies = request .getCookies ();
128146 for (Cookie cookie :cookies ){
@@ -146,7 +164,6 @@ public boolean needAdmin() {
146164 return true ;
147165 }
148166
149-
150167 public static class ActionAuthorizationInfo {
151168 public String fullUserName ;
152169 public String remoteIp ;
0 commit comments