Added protected api for authentication with resource
@@ -51,8 +51,7 @@ public abstract class OServerCommandAuthenticatedServerAbstract extends OServerC
return authenticate(iRequest, iResponse, true);
}
- protected boolean authenticate(final OHttpRequest iRequest, final OHttpResponse iResponse, final boolean iAskForAuthentication)
- throws IOException {
+ protected boolean authenticate(final OHttpRequest iRequest, final OHttpResponse iResponse, final boolean iAskForAuthentication, String resource) throws IOException {
if (checkGuestAccess()) {
// GUEST ACCESSES TO THE RESOURCE: OK ALSO WITHOUT AN AUTHENTICATION.
iResponse.sessionId = null;
@@ -86,6 +85,10 @@ public abstract class OServerCommandAuthenticatedServerAbstract extends OServerC
sendNotAuthorizedResponse(iRequest, iResponse);
return false;
}
+ protected boolean authenticate(final OHttpRequest iRequest, final OHttpResponse iResponse, final boolean iAskForAuthentication)
+ throws IOException {
+ return authenticate(iRequest,iResponse,iAskForAuthentication,resource);
+ }
protected boolean checkGuestAccess() {
return server.isAllowed(OServerConfiguration.GUEST_USER, resource);
