Class NegTokenInit

java.lang.Object
com.hierynomus.spnego.SpnegoToken
com.hierynomus.spnego.NegTokenInit
Direct Known Subclasses:
NegTokenInit2

public class NegTokenInit 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 is the full ASN.1 specification of the token:

 GSSAPI          ::=  [APPLICATION 0] IMPLICIT SEQUENCE {
   mech                MechType,
   negTokenInit        NegotiationToken
 }

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

 NegTokenInit     ::=  SEQUENCE {
   mechTypes      [0]  MechTypeList  OPTIONAL,
   reqFlags       [1]  ContextFlags  OPTIONAL,
   mechToken      [2]  OCTET STRING  OPTIONAL,
   mechListMIC    [3]  OCTET STRING  OPTIONAL
 }

 MechTypeList     ::=  SEQUENCE of MechType

 ContextFlags     ::=  BIT_STRING {
   delegFlag      (0),
   mutualFlag     (1),
   replayFlag     (2),
   sequenceFlag   (3),
   anonFlag       (4),
   confFlag       (5),
   integFlag      (6)
 }

 MechType         ::=  OBJECT IDENTIFIER
 

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

  • When an InitToken is sent, it is prepended by the generic GSSAPI header.
  • The "mech" field of the GSSAPI header is always set to the SPNEGO OID (1.3.6.1.5.5.2)
  • The negTokenInit will have a lead byte of 0xa0 (the CHOICE tagged object).
  • Field Details

    • ADS_IGNORE_PRINCIPAL

      static final String ADS_IGNORE_PRINCIPAL
      See Also:
    • mechTypes

      private List<com.hierynomus.asn1.types.primitive.ASN1ObjectIdentifier> mechTypes
    • mechToken

      protected byte[] mechToken
  • Constructor Details

    • NegTokenInit

      public NegTokenInit()
  • Method Details