类 AuthSDK

java.lang.Object
com.infilake.openapi.bidding.AuthSDK

public class AuthSDK extends Object
Infilake OpenAPI Auth SDK SDK for generating HMAC-SHA256 authorization headers
  • 构造器详细资料

    • AuthSDK

      public AuthSDK(String hmacSecret)
      Initialize AuthSDK with HMAC secret
      参数:
      hmacSecret - The HMAC secret key
  • 方法详细资料

    • generateTimestamp

      public static String generateTimestamp()
      Generate timestamp in format: YYYYMMDDTHHMMSSZ
      返回:
      Formatted timestamp string
    • sign

      public AuthSDK.AuthResult sign(String signUrl, String requestAction)
      Generate authorization signature
      参数:
      signUrl - The URL to sign
      requestAction - HTTP method (default: GET)
      返回:
      AuthResult with timestamp and authorization
    • getHeaders

      public Map<String,String> getHeaders(String signUrl, String requestAction)
      Generate headers map ready for HTTP request
      参数:
      signUrl - The URL to sign
      requestAction - HTTP method (default: GET)
      返回:
      Map with X-Timestamp and X-Authorization headers