Class Cord

java.lang.Object
com.cord.server.Cord

public class Cord extends Object
  • Constructor Details

    • Cord

      public Cord()
  • Method Details

    • getClientAuthToken

      public static String getClientAuthToken(String app_id, String secret, ClientAuthTokenData payload)
      This method should be used to sign a JWT token and send it to the frontend part of the application, which will use the said token to authenticate the web components.
      Parameters:
      app_id - The application id, found in console.cord.com
      secret - The secret corresponding to the application id, also found in console.cord.cord
      payload - The payload of type ClientAuthTokenData which should contain the user and organization information for the particular user you want to authenticate
      Returns:
      A signed JWT token which should successfully authenticate a user in the frontend web components
    • getServerAuthToken

      public static String getServerAuthToken(String app_id, String secret)
      This method should be used to sign a JWT token which is required to authenticate for the Cord REST APIs. The relevant APIs are used to sync your users and organizations with the Cord data
      Parameters:
      app_id - The application id, found in console.cord.com
      secret - The secret corresponding to the application id, also found in console.cord.cord
      Returns:
      A signed JWT token which should successfully authenticate all REST API requests