Class NegTokenTarg

java.lang.Object
com.hierynomus.spnego.SpnegoToken
com.hierynomus.spnego.NegTokenTarg

public class NegTokenTarg extends SpnegoToken
This class can encode and decode the SPNEGO negTokenInit Token.

The entire token is an ASN.1 DER encoded sequence of bytes in little endian byte encoding.

The following if the ASN.1 specification of the full structure of the token:

 NegotiationToken ::=  CHOICE {
   negTokenInit   [0]  NegTokenInit,
   negTokenTarg   [1]  NegTokenTarg
 }

 NegTokenTarg     ::=  SEQUENCE {
   negResult      [0]  ENUMERATED {
                            accept_completed (0),
                            accept_incomplete (1),
                            rejected (2) }  OPTIONAL,
   supportedMech  [1]  MechType             OPTIONAL,
   responseToken  [2]  OCTET STRING         OPTIONAL,
   mechListMIC    [3]  OCTET STRING         OPTIONAL
 }

 MechType         ::=  OBJECT IDENTIFIER
 

In the context of this class only the NegTokenTarg is covered.

  • Field Details

    • negotiationResult

      private BigInteger negotiationResult
    • supportedMech

      private com.hierynomus.asn1.types.primitive.ASN1ObjectIdentifier supportedMech
    • responseToken

      private byte[] responseToken
    • mechListMic

      private byte[] mechListMic
  • Constructor Details

    • NegTokenTarg

      public NegTokenTarg()
  • Method Details

    • writeGss

      protected void writeGss(Buffer<?> buffer, com.hierynomus.asn1.types.ASN1Object<?> negToken) throws IOException
      Overrides:
      writeGss in class SpnegoToken
      Throws:
      IOException
    • write

      public void write(Buffer<?> buffer) throws SpnegoException
      Specified by:
      write in class SpnegoToken
      Throws:
      SpnegoException
    • read

      public NegTokenTarg read(byte[] bytes) throws SpnegoException
      Throws:
      SpnegoException
    • read

      private NegTokenTarg read(Buffer<?> buffer) throws SpnegoException
      Throws:
      SpnegoException
    • parseTagged

      protected void parseTagged(com.hierynomus.asn1.types.constructed.ASN1TaggedObject asn1TaggedObject) throws SpnegoException
      Specified by:
      parseTagged in class SpnegoToken
      Throws:
      SpnegoException
    • readResponseToken

      private void readResponseToken(com.hierynomus.asn1.types.ASN1Object<?> responseToken) throws SpnegoException
      Throws:
      SpnegoException
    • readMechListMIC

      private void readMechListMIC(com.hierynomus.asn1.types.ASN1Object<?> mic) throws SpnegoException
      Throws:
      SpnegoException
    • readSupportedMech

      private void readSupportedMech(com.hierynomus.asn1.types.ASN1Object<?> supportedMech) throws SpnegoException
      Throws:
      SpnegoException
    • readNegResult

      private void readNegResult(com.hierynomus.asn1.types.ASN1Object<?> object) throws SpnegoException
      Throws:
      SpnegoException
    • getNegotiationResult

      public BigInteger getNegotiationResult()
    • setNegotiationResult

      public void setNegotiationResult(BigInteger negotiationResult)
    • getSupportedMech

      public com.hierynomus.asn1.types.primitive.ASN1ObjectIdentifier getSupportedMech()
    • setSupportedMech

      public void setSupportedMech(com.hierynomus.asn1.types.primitive.ASN1ObjectIdentifier supportedMech)
    • getResponseToken

      public byte[] getResponseToken()
    • setResponseToken

      public void setResponseToken(byte[] responseToken)
    • getMechListMic

      public byte[] getMechListMic()
    • setMechListMic

      public void setMechListMic(byte[] mechListMic)