Class CommonJsonApiKey

  • All Implemented Interfaces:
    ApiKey

    public class CommonJsonApiKey
    extends Object
    implements ApiKey
    • Constructor Detail

      • CommonJsonApiKey

        public CommonJsonApiKey​(String id,
                                org.json.JSONObject record)
    • Method Detail

      • initialize

        public static org.json.JSONObject initialize​(String secret,
                                                     String userId)
      • getKey

        public String getKey()
        Description copied from interface: ApiKey
        Get the API key part.
        Specified by:
        getKey in interface ApiKey
        Returns:
        a string
      • getSecret

        public String getSecret()
        Description copied from interface: ApiKey
        Get the API key's secret part.
        Specified by:
        getSecret in interface ApiKey
        Returns:
        a string
      • getUserId

        public String getUserId()
        Description copied from interface: ApiKey
        Get the user associated with this key.
        Specified by:
        getUserId in interface ApiKey
        Returns:
        the user id
      • getCreationTimestamp

        public long getCreationTimestamp()
        Description copied from interface: ApiKey
        Get the creation timestamp
        Specified by:
        getCreationTimestamp in interface ApiKey
        Returns:
        the API creation timestamp