-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c052bb2
commit 8f2e510
Showing
11 changed files
with
1,136 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
89 changes: 89 additions & 0 deletions
89
gateway-ha/src/main/java/io/trino/gateway/ha/config/RequestAnalyzerConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
/* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package io.trino.gateway.ha.config; | ||
|
||
public class RequestAnalyzerConfig | ||
{ | ||
private Integer maxBodySize = 1_000_000; | ||
|
||
private boolean isClientsUseV2Format; | ||
private String tokenUserField = "email"; | ||
private String oauthTokenInfoUrl; | ||
private boolean isGetUserFromOauth; | ||
|
||
private boolean isAnalyzeRequest; | ||
|
||
public RequestAnalyzerConfig() {} | ||
|
||
public Integer getMaxBodySize() | ||
{ | ||
return maxBodySize; | ||
} | ||
|
||
public void setMaxBodySize(Integer maxBodySize) | ||
{ | ||
this.maxBodySize = maxBodySize; | ||
} | ||
|
||
public String getTokenUserField() | ||
{ | ||
return tokenUserField; | ||
} | ||
|
||
public void setTokenUserField(String tokenUserField) | ||
{ | ||
this.tokenUserField = tokenUserField; | ||
} | ||
|
||
public String getOauthTokenInfoUrl() | ||
{ | ||
return oauthTokenInfoUrl; | ||
//Google: "https://oauth2.googleapis.com/tokeninfo" | ||
} | ||
|
||
public void setOauthTokenInfoUrl(String oauthTokenInfoUrl) | ||
{ | ||
this.oauthTokenInfoUrl = oauthTokenInfoUrl; | ||
} | ||
|
||
public boolean isGetUserFromOauth() | ||
{ | ||
return isGetUserFromOauth; | ||
} | ||
|
||
public void setGetUserFromOauth(boolean getUserFromOauth) | ||
{ | ||
isGetUserFromOauth = getUserFromOauth; | ||
} | ||
|
||
public boolean isClientsUseV2Format() | ||
{ | ||
return isClientsUseV2Format; | ||
} | ||
|
||
public void setClientsUseV2Format(boolean clientsUseV2Format) | ||
{ | ||
isClientsUseV2Format = clientsUseV2Format; | ||
} | ||
|
||
public boolean isAnalyzeRequest() | ||
{ | ||
return isAnalyzeRequest; | ||
} | ||
|
||
public void setAnalyzeRequest(boolean analyzeRequest) | ||
{ | ||
isAnalyzeRequest = analyzeRequest; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.