Package org.eclipse.emf.cdo.spi.server

## Class AuthenticationUtil

- java.lang.Object
- - org.eclipse.emf.cdo.spi.server.AuthenticationUtil

-     public final class AuthenticationUtil
      extends java.lang.Object

  Static utility methods for binding `authentication protocols` to the current thread.
  Since:
    4.3
  Author:
    Christian W. Damus (CEA LIST)

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `static class` | `AuthenticationUtil.AuthenticatingOperation<V>` | Encapsulation of an administrative operation requiring (potentially) client authentication to authorize the operation.

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static <V> java.util.concurrent.Callable<V>` | `authenticatingOperation​(IAuthenticationProtocol authenticationProtocol, java.util.concurrent.Callable<V> operation)` | Wrap an `operation` to make an authentication protocol available to the thread that invokes it, for the duration of the `operation`'s execution.
    `static IAuthenticationProtocol` | `getAuthenticationProtocol()` | Obtains the authentication protocol, if any, on which the current thread should authenticate administrative operations in handling incoming signals.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### getAuthenticationProtocol

          public static IAuthenticationProtocol getAuthenticationProtocol()

      Obtains the authentication protocol, if any, on which the current thread should authenticate administrative operations in handling incoming signals.
      Returns:
        the authentication protocol to use, or `null` if authentication is not required

    - #### authenticatingOperation

          public static <V> java.util.concurrent.Callable<V> authenticatingOperation​(IAuthenticationProtocol authenticationProtocol,
                                                                                     java.util.concurrent.Callable<V> operation)

      Wrap an `operation` to make an authentication protocol available to the thread that invokes it, for the duration of the `operation`'s execution.