### *** This class provides Binary Compatibility only, not Source Compatibility ***

Package com.sas.services.security

# Class AuthenticationService

java.lang.Object
com.sas.services.AbstractRemoteService
com.sas.services.security.AuthenticationService

All Implemented Interfaces:
  `com.sas.entities.EntityKeyInterface`, `ServiceNotificationBroadcasterInterface`, `RemoteServiceInterface`, `AuthenticationServiceInterface`, `Remote`

@SASScope("ALL") @BinaryCompatibilityOnly public class AuthenticationService extends AbstractRemoteService implements AuthenticationServiceInterface
The Authentication Service class. The only useful methods are getDomains which returns a List of the configured login domains, and getAuthenticator.

Since:
  1.0
See Also:
  - `AuthenticationServiceFactory`
  - `AuthenticationServiceInitObject`

- ## Field Summary

  ### Fields inherited from interface com.sas.services.security.AuthenticationServiceInterface

  `IDPROPAGATION_SSPI, IDPROPAGATION_TRUSTED_PEER, PROPERTYDEFAULT_LOGIN_CONFIG_APP_NAME, PROPERTYNAME_LOGIN_CONFIG_APP_NAME`

  ### Fields inherited from interface com.sas.services.RemoteServiceInterface

  `CLASS_IDENTIFIER, CLASS_IDENTIFIER_1_1, CLASS_IDENTIFIER_1_2, CLASS_IDENTIFIER_SERVICE_TYPE, CLASS_IDENTIFIER_SERVICE_TYPE_1_1, CLASS_IDENTIFIER_SERVICE_TYPE_1_2`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `configure(ServiceConfigurationInterface serviceConfiguration)`
  Configures service.
  `static final AuthenticationServiceInterface`
  `defaultInstance(ServiceConfigurationInterface serviceConfiguration, DiscoveryServiceInterface discoveryService)`
  Gets the authentication service.
  `void`
  `destroy()`
  Destroys the service.
  `AuthenticatorInterface`
  `getAuthenticator()`
  Gets a new Authenticator.
  `List`
  `getDomains()`
  Gets a list of domains.
  `String`
  `getIDPropagation(String domain)`
  Determines whether ID propagation is supported for the specified domain.
  `final String`
  `getLoginConfigAppName()`
  The name of the application entry in the JAAS login configuration that applies to this services deployment.
  `final RemoteServiceInterface`
  `getServiceProxy()`
  Gets the service proxy.
  `void`
  `initialize(AuthenticationServiceInitObject authServiceConfig)`
  Initializes the Authentication Service using the specified configuration.
  `boolean`
  `isTrusted(String domain)`
  Determines whether the specified domain is trusted.

  ### Methods inherited from class com.sas.services.AbstractRemoteService

  `addServiceObserver, bindToDiscoveryService, getCreationTime, getDetails, getDiscoveryService, getEntityKey, getEnvironment, getServiceConfiguration, getServiceConfiguration, getServiceState, handleJVMShutdown, isAccessibleToRemoteClients, isExported, isHandlingJVMShutdown, notifyServiceObservers, reconfigure, removeAllServiceObservers, removeServiceObserver, sameEntity, setDiscoveryService, setEntityKey, setRemoteableExporter, setServiceState, toString, unbindFromDiscoveryService`

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

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

  ### Methods inherited from interface com.sas.entities.EntityKeyInterface

  `getEntityKey, sameEntity, setEntityKey`

  ### Methods inherited from interface com.sas.services.RemoteServiceInterface

  `getCreationTime, getServiceConfiguration, getServiceConfiguration, getServiceState, isAccessibleToRemoteClients, isExported, reconfigure, setServiceState`

  ### Methods inherited from interface com.sas.services.mgmt.ServiceNotificationBroadcasterInterface

  `addServiceObserver, notifyServiceObservers, removeAllServiceObservers, removeServiceObserver`

- ## Method Details

  - ### defaultInstance

    public static final AuthenticationServiceInterface defaultInstance(ServiceConfigurationInterface serviceConfiguration, DiscoveryServiceInterface discoveryService) throws RemoteException, ServiceException
    Gets the authentication service.
    Parameters:
      `serviceConfiguration` - Service configuration.
      `discoveryService` - Discovery service to which the service will be registered.
    Returns:
      Singleton authentication service.
    Throws:
      `RemoteException` - if a network anomaly occurs.
      `ServiceException` - if unable to obtain an authentication service.

  - ### configure

    public void configure(ServiceConfigurationInterface serviceConfiguration) throws RemoteException, ServiceException
    Configures service. Note that this method may used to initialize a service or to re-configure a previously initialized service.
    Specified by:
      `configure` in interface `RemoteServiceInterface`
    Overrides:
      `configure` in class `AbstractRemoteService`
    Parameters:
      `serviceConfiguration` - An object containing configuration data necessary to initialize or re-configure a service. Note that the service provider must verify that the object type is supported. An `ServiceException` should be thrown if the initialization was not completed successfully to indicate that the instance should not be used.
    Throws:
      `ServiceException` - if unable to configure the service.
      `RemoteException` - if a network anomaly is encountered.

  - ### initialize

    public void initialize(AuthenticationServiceInitObject authServiceConfig) throws ServiceException, RemoteException
    Initializes the Authentication Service using the specified configuration.
    Parameters:
      `authServiceConfig` - Authentication Service configuration or `null` to use the default configuration.
    Throws:
      `ServiceException` - is unable to initialize.
      `RemoteException` - if unable to communicate with a remote object or an exception occurred in the remote object.

  - ### destroy

    public void destroy() throws ServiceException, RemoteException
    Destroys the service. The service should release any resources it holds in preparation for termination of use of this service.
    - Clear list of authenticators
    - Clear domains list
    - Clear default domain
    Specified by:
      `destroy` in interface `RemoteServiceInterface`
    Overrides:
      `destroy` in class `AbstractRemoteService`
    Throws:
      `RemoteException` - if a network anomaly is encountered.
      `ServiceException` - if the service is unable to prepare itself for destruction.

  - ### getServiceProxy

    public final RemoteServiceInterface getServiceProxy()
    Gets the service proxy.
    Specified by:
      `getServiceProxy` in interface `RemoteServiceInterface`
    Overrides:
      `getServiceProxy` in class `AbstractRemoteService`
    Returns:
      A proxy to this service or `null` if a proxy is not available.

  - ### getDomains

    public List getDomains() throws RemoteException
    Gets a list of domains.
    Specified by:
      `getDomains` in interface `AuthenticationServiceInterface`
    Returns:
      List of `String` elements representing authentication domains.
    Throws:
      `RemoteException` - if a network anomaly is encountered.

  - ### getAuthenticator

    public AuthenticatorInterface getAuthenticator() throws RemoteException
    Gets a new Authenticator.
    Specified by:
      `getAuthenticator` in interface `AuthenticationServiceInterface`
    Returns:
      A new AuthenticatorInterface object.
    Throws:
      `RemoteException` - if a network anomaly is encountered.

  - ### getLoginConfigAppName

    public final String getLoginConfigAppName() throws RemoteException
    Description copied from interface: `AuthenticationServiceInterface`
    The name of the application entry in the JAAS login configuration that applies to this services deployment. This value comes from the system property `com.sas.services.security.LOGIN_CONFIG_APP_NAME` or if there is no value for that property, from the Authentication Service configuration.
    Specified by:
      `getLoginConfigAppName` in interface `AuthenticationServiceInterface`
    Returns:
      the name of an application entry in the JAAS login configuration.
    Throws:
      `RemoteException` - if a network anomaly is encountered.
    See Also:
      - `AuthenticationServiceInterface.PROPERTYNAME_LOGIN_CONFIG_APP_NAME`

  - ### isTrusted

    public boolean isTrusted(String domain) throws ServiceException, RemoteException
    Determines whether the specified domain is trusted.
    Specified by:
      `isTrusted` in interface `AuthenticationServiceInterface`
    Parameters:
      `domain` - Domain for which we desire its trusted status.
    Returns:
      True if the domain is configured to use the trusted authentication login module, false otherwise.
    Throws:
      `ServiceException` - if unable to determine the trusted status.
      `RemoteException` - if unable to communicate with a remote object.

  - ### getIDPropagation

    public String getIDPropagation(String domain) throws ServiceException, RemoteException
    Determines whether ID propagation is supported for the specified domain.
    Specified by:
      `getIDPropagation` in interface `AuthenticationServiceInterface`
    Parameters:
      `domain` - Domain for which we desire ID propagation status.
    Returns:
      the ID propagation authentication mechanism supported by the named domain
    Throws:
      `ServiceException` - if unable to determine the ID propagation status.
      `RemoteException` - if unable to communicate with a remote object.
    See Also:
      - `AuthenticationServiceInterface.IDPROPAGATION_SSPI`
      - `AuthenticationServiceInterface.IDPROPAGATION_TRUSTED_PEER`