Class PreAuthToken

  • All Implemented Interfaces:
    java.io.Externalizable , java.io.Serializable , java.lang.Comparable , org.apache.avro.generic.GenericContainer , org.apache.avro.generic.GenericRecord , org.apache.avro.generic.IndexedRecord , org.apache.avro.specific.SpecificRecord

    
    public class PreAuthToken
    extends SpecificRecordBase implements SpecificRecord
                        

    A token issued to a holding identity, used to authenticate a registration request.

    • Constructor Detail

      • PreAuthToken

        PreAuthToken()
        Default constructor.
      • PreAuthToken

        PreAuthToken(String id, String ownerX500Name, Instant ttl, PreAuthTokenStatus status, String creationRemark, String removalRemark)
        All-args constructor.
        Parameters:
        id - A unique identifier of the token.
        ownerX500Name - The X500 name of the holding identity that the token belongs to.
        ttl - Unix timestamp for when the pre auth token expires.
        status - The current status of the token.
        creationRemark - An optional remark added when the token was created.
        removalRemark - An optional remark added when the token is consumed, revoked or auto invalidated.
    • Method Detail

      • getId

         String getId()

        Gets the value of the 'id' field.

      • setId

         void setId(String value)

        Sets the value of the 'id' field. A unique identifier of the token.

        Parameters:
        value - the value to set.
      • setOwnerX500Name

         void setOwnerX500Name(String value)

        Sets the value of the 'ownerX500Name' field. The X500 name of the holding identity that the token belongs to.

        Parameters:
        value - the value to set.
      • setTtl

         void setTtl(Instant value)

        Sets the value of the 'ttl' field. Unix timestamp for when the pre auth token expires. In milliseconds since the epoch.

        Parameters:
        value - the value to set.
      • setStatus

         void setStatus(PreAuthTokenStatus value)

        Sets the value of the 'status' field. The current status of the token.

        Parameters:
        value - the value to set.
      • setCreationRemark

         void setCreationRemark(String value)

        Sets the value of the 'creationRemark' field. An optional remark added when the token was created.

        Parameters:
        value - the value to set.
      • setRemovalRemark

         void setRemovalRemark(String value)

        Sets the value of the 'removalRemark' field. An optional remark added when the token is consumed, revoked or auto invalidated.

        Parameters:
        value - the value to set.
      • getEncoder

         static BinaryMessageEncoder<PreAuthToken> getEncoder()

        Return the BinaryMessageEncoder instance used by this class.

      • getDecoder

         static BinaryMessageDecoder<PreAuthToken> getDecoder()

        Return the BinaryMessageDecoder instance used by this class.

      • createDecoder

         static BinaryMessageDecoder<PreAuthToken> createDecoder(SchemaStore resolver)

        Create a new BinaryMessageDecoder instance for this class that uses the specified SchemaStore.

        Parameters:
        resolver - a SchemaStore used to find schemas by fingerprint
      • fromByteBuffer

         static PreAuthToken fromByteBuffer(ByteBuffer b)

        Deserializes a PreAuthToken from a ByteBuffer.

        Parameters:
        b - a byte buffer holding serialized data for an instance of this class
      • newBuilder

         static PreAuthToken.Builder newBuilder(PreAuthToken other)

        Creates a new PreAuthToken RecordBuilder by copying an existing PreAuthToken instance.

        Parameters:
        other - The existing instance to copy.