com.trendmicro.ds.platform.rest.api

## Interface IAuthenticationAPI

-     @Path(value="/authentication")
      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 sessionId)` 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` | `loginForNonce(DSCredentials credentials)` Authenticate an user, and return a temporary token for UI Single Sign On.
    `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 sessionId)` Sign in as a tenant, and return a session ID (sID) to use in subsequent calls to other APIs.

- - ### Method Detail

    - #### loginPrimaryTenant

          @POST
           @Path(value="/login/primary")
           @Consumes(value={"application/xml","application/json"})
           @Produces(value="text/plain")
          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 the session ID value to pass to subsequent API methods that look for a session ID.
      Throws:
        `java.lang.Exception`

    - #### login

          @POST
           @Path(value="/login")
           @Consumes(value={"application/xml","application/json"})
           @Produces(value="text/plain")
          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: The session token can be used for UI Single Sign On only within a limited time.

      Parameters:
        `credentials` - The credentials to use to authenticate.
        `mfacode` - The multi-factor authentication (MFA) code which is valid at this time for the user in the credentials JSON structure. This is only required for users which have MFA enabled for their account.
      Returns:
        session ID the session ID value to pass to subsequent API methods that look for a session ID.
      Throws:
        `java.lang.Exception`

    - #### loginSSO

          @POST
           @Path(value="/login/sso")
           @Consumes(value={"application/xml","application/json"})
           @Produces(value="text/plain")
          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`

    - #### loginForNonce

          @POST
           @Path(value="/login/nonce")
           @Consumes(value={"application/xml","application/json"})
           @Produces(value="text/plain")
          java.lang.String loginForNonce(DSCredentials credentials)
                                                                                                                                                             throws java.lang.Exception

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

      Note : The temporary token can be used for UI Single Sign On only within a limited time. The API exists for a specialized integration with MicroSoft Azure Portal.

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

    - #### endSession

          @DELETE
           @Path(value="/logout")
           @Produces(value="text/plain")
          java.lang.String endSession(@QueryParam(value="sID")
                                                                                                     java.lang.String sessionId)

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

    - #### signInAsTenant

          @GET
           @Path(value="/signinastenant/name/{tenantName}")
           @Produces(value="text/plain")
          java.lang.String signInAsTenant(@PathParam(value="tenantName")
                                                                                                                                java.lang.String tenantName,
                                                                                                                                @QueryParam(value="sID")
                                                                                                                                java.lang.String sessionId)
                                                                                                                         throws java.lang.Exception

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

      Note:

      - Sign in as a tenant will not log out the original session
      - 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
        `sessionId` - a session ID returned by the Authentication API for the primary tenant user session.
      Returns:
        the tenant session ID value to pass to subsequent API methods that look for a session ID.
      Throws:
        `java.lang.Exception`

Copyright © 2017 Trend Micro Inc. All Rights Reserved.