Skip to content

Commit 2e8da02

Browse files
committed
Drop authenticate() method.
1 parent ece4365 commit 2e8da02

File tree

2 files changed

+1
-30
lines changed

2 files changed

+1
-30
lines changed

README.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -240,15 +240,6 @@ The connection is opened via a data source identified by `getDataSourceName()`,
240240

241241
Auto-commit is disabled so an entire request will be processed within a single transaction. If the request completes successfully, the transaction is committed. Otherwise, it is rolled back.
242242

243-
### Authentication
244-
Services that require authentication can override the following method, which returns `true` by default:
245-
246-
```java
247-
protected boolean authenticate(HttpServletRequest request, HttpServletResponse response) { ... }
248-
```
249-
250-
If this method returns `false`, the requested operation will not be performed.
251-
252243
### Request and Repsonse Properties
253244
The following methods provide access to the request and response objects associated with the current invocation:
254245

kilo-server/src/main/java/org/httprpc/kilo/WebService.java

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -845,11 +845,7 @@ protected void service(HttpServletRequest request, HttpServletResponse response)
845845
setConnection(connection);
846846

847847
try {
848-
if (authenticate(request, response)) {
849-
invoke(request, response);
850-
}
851-
852-
response.flushBuffer();
848+
invoke(request, response);
853849

854850
if (connection != null) {
855851
if (response.getStatus() / 100 == 2) {
@@ -915,22 +911,6 @@ protected String getDataSourceName() {
915911
return null;
916912
}
917913

918-
/**
919-
* Authenticates a service request.
920-
*
921-
* @param request
922-
* The HTTP servlet request.
923-
*
924-
* @param response
925-
* The HTTP servlet response.
926-
*
927-
* @return
928-
* {@code true} if the request was authenticated; {@code false}, otherwise.
929-
*/
930-
protected boolean authenticate(HttpServletRequest request, HttpServletResponse response) {
931-
return true;
932-
}
933-
934914
/**
935915
* Invokes a service method.
936916
*

0 commit comments

Comments
 (0)