public abstract class ServiceCommon<S extends Session,SI extends AbstractSessionImpl> extends Object implements Service<S>
| Modifier and Type | Field and Description |
|---|---|
protected static org.eclipse.scada.sec.AuthorizationResult |
DEFAULT_RESULT |
| Constructor and Description |
|---|
ServiceCommon() |
| Modifier and Type | Method and Description |
|---|---|
protected org.eclipse.scada.utils.concurrent.NotifyFuture<org.eclipse.scada.sec.AuthorizationReply> |
authorize(org.eclipse.scada.sec.AuthorizationRequest request,
org.eclipse.scada.sec.callback.CallbackHandler callbackHandler) |
protected org.eclipse.scada.utils.concurrent.NotifyFuture<org.eclipse.scada.sec.AuthorizationReply> |
authorize(org.eclipse.scada.sec.AuthorizationRequest request,
org.eclipse.scada.sec.callback.CallbackHandler callbackHandler,
org.eclipse.scada.sec.AuthorizationResult defaultResult)
Authorize an operation
|
protected Set<String> |
extractPrivileges(Properties properties) |
protected void |
fillSessionProperties(org.eclipse.scada.sec.UserInformation userInformation,
Map<String,String> sessionResultProperties) |
protected org.eclipse.scada.utils.concurrent.NotifyFuture<org.eclipse.scada.sec.UserInformation> |
loginUser(Properties properties,
org.eclipse.scada.sec.callback.CallbackHandler callbackHandler)
Wraps the call to
#authenticate(Properties) so that the correct
exceptions are thrown for a #createSession(Properties) call. |
protected org.eclipse.scada.utils.concurrent.NotifyFuture<org.eclipse.scada.sec.UserInformation> |
makeEffectiveUserInformation(AbstractSessionImpl session,
String targetUser,
org.eclipse.scada.sec.callback.CallbackHandler handler) |
void |
setAuditLogService(org.eclipse.scada.sec.audit.AuditLogService auditLogService) |
protected void |
setAuthenticationImplementation(org.eclipse.scada.sec.AuthenticationImplementation authenticationImplementation) |
protected void |
setAuthorizationImplementation(org.eclipse.scada.sec.AuthorizationImplementation authorizationImplementation) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcloseSession, createSessionprotected static final org.eclipse.scada.sec.AuthorizationResult DEFAULT_RESULT
public void setAuditLogService(org.eclipse.scada.sec.audit.AuditLogService auditLogService)
protected void setAuthenticationImplementation(org.eclipse.scada.sec.AuthenticationImplementation authenticationImplementation)
protected void setAuthorizationImplementation(org.eclipse.scada.sec.AuthorizationImplementation authorizationImplementation)
protected Set<String> extractPrivileges(Properties properties)
protected org.eclipse.scada.utils.concurrent.NotifyFuture<org.eclipse.scada.sec.UserInformation> loginUser(Properties properties, org.eclipse.scada.sec.callback.CallbackHandler callbackHandler)
#authenticate(Properties) so that the correct
exceptions are thrown for a #createSession(Properties) call.properties - the user session propertiescallbackHandler - the callback handler which handles callbackssessionResultProperties - the map will be filled with the resulting session properties#authenticate(Properties)#authenticate(Properties)protected void fillSessionProperties(org.eclipse.scada.sec.UserInformation userInformation,
Map<String,String> sessionResultProperties)
protected org.eclipse.scada.utils.concurrent.NotifyFuture<org.eclipse.scada.sec.AuthorizationReply> authorize(org.eclipse.scada.sec.AuthorizationRequest request,
org.eclipse.scada.sec.callback.CallbackHandler callbackHandler)
protected org.eclipse.scada.utils.concurrent.NotifyFuture<org.eclipse.scada.sec.AuthorizationReply> authorize(org.eclipse.scada.sec.AuthorizationRequest request,
org.eclipse.scada.sec.callback.CallbackHandler callbackHandler,
org.eclipse.scada.sec.AuthorizationResult defaultResult)
The default implementation grants everything. Override to change according to your needs.
objectType - the type of the object the operation takes placeobjectId - the id of the object the operation takes placeuserInformation - the user informationcontext - the context informationdefaultResult - the default result that should be returned if no one votes,
must not be nullnullprotected org.eclipse.scada.utils.concurrent.NotifyFuture<org.eclipse.scada.sec.UserInformation> makeEffectiveUserInformation(AbstractSessionImpl session, String targetUser, org.eclipse.scada.sec.callback.CallbackHandler handler)