com.trendmicro.ds.platform.rest.api

## Interface IAuthenticationAPI

-     public interface IAuthenticationAPI

  Interface for the authentication API.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `endSession(java.lang.String sID)` Ends the client session.
    `java.lang.String` | `login(DSCredentials credentials)` Authenticate a user, and return a session ID (sID) to use in subsequent calls to other APIs.
    `java.lang.String` | `loginPrimaryTenant(DSCredentials credentials)` Authenticate a primary tenant user, and return a session ID (sID) to use in subsequent calls to other APIs.
    `java.lang.String` | `loginSSO(DSCredentials credentials)` Authenticate a user, and return a session token for UI Single Sign On.
    `java.lang.String` | `signInAsTenant(java.lang.String tenantName, java.lang.String sID)` SignIn as a tenant, and return a session ID (sID) to use in subsequent calls to other APIs.

- - ### Method Detail

    - #### loginPrimaryTenant

          java.lang.String loginPrimaryTenant(DSCredentials credentials)
                                       throws java.lang.Exception

      Authenticate a primary tenant user, and return a session ID (sID) to use in subsequent calls to other APIs.

      Note: if your application uses both the SOAP web services API and the REST API, the same session ID can be used in both APIs; you do not need to log in separately to each API.

      Parameters:
        `credentials` - The credentials to use to authenticate.
      Returns:
        session ID (sID)
      Throws:
        `java.lang.Exception`

    - #### login

          java.lang.String login(DSCredentials credentials)
                          throws java.lang.Exception

      Authenticate a user, and return a session ID (sID) to use in subsequent calls to other APIs.

      Note: if your application uses both the SOAP web services API and the REST API, the same session ID can be used in both APIs; you do not need to log in separately to each API.

      Parameters:
        `credentials` - The credentials to use to authenticate.
      Returns:
        session ID (sID)
      Throws:
        `java.lang.Exception`

    - #### loginSSO

          java.lang.String loginSSO(DSCredentials credentials)
                             throws java.lang.Exception

      Authenticate a user, and return a session token for UI Single Sign On.

      Note: The session token can be used for UI Single Sign On only within a limited time.

      Parameters:
        `credentials` - The credentials to use to authenticate.
      Returns:
        SSO session token
      Throws:
        `java.lang.Exception`

    - #### endSession

          java.lang.String endSession(java.lang.String sID)

      Ends the client session. The given session ID will not be usable after this call.
      Parameters:
        `sID` - session ID
      Returns:
        a response with status `200 OK` when the logout succeeds. The returned string is purely informational and can be ignored.

    - #### signInAsTenant

          java.lang.String signInAsTenant(java.lang.String tenantName,
                                          java.lang.String sID)
                                   throws java.lang.Exception

      SignIn as a tenant, and return a session ID (sID) to use in subsequent calls to other APIs. *

      Note: 1. SignIn as a tenant will not log out original session 2. if your application uses both the SOAP web services API and the REST API, the same session ID can be used in both APIs; you do not need to log in separately to each API.

      Parameters:
        `tenantName` - The tenant's name
        `sID` - primary tenant user session ID.
      Returns:
        tenant session ID (sID)
      Throws:
        `java.lang.Exception`

Copyright © 2015 Trend Micro Inc. All Rights Reserved.