Module jcifs

Class SpnegoToken

java.lang.Object
org.codelibs.jcifs.smb.spnego.SpnegoToken
Direct Known Subclasses:
NegTokenInit, NegTokenTarg

public abstract class SpnegoToken extends Object
Abstract base class for SPNEGO authentication tokens used in GSS-API negotiation
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Protected constructor for SPNEGO token implementations.
  • Method Summary

    Modifier and Type
    Method
    Description
    byte[]
    Gets the mechanism list MIC (Message Integrity Code) for integrity protection
    byte[]
    Gets the inner mechanism token wrapped in this SPNEGO token
    protected abstract void
    parse(byte[] token)
    Parses the provided token bytes to populate this SPNEGO token
    void
    setMechanismListMIC(byte[] mechanismListMIC)
    Sets the mechanism list MIC (Message Integrity Code) for integrity protection
    void
    setMechanismToken(byte[] mechanismToken)
    Sets the inner mechanism token to be wrapped in this SPNEGO token
    abstract byte[]
    Encodes this SPNEGO token to a byte array

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SpnegoToken

      protected SpnegoToken()
      Protected constructor for SPNEGO token implementations.
  • Method Details

    • getMechanismToken

      public byte[] getMechanismToken()
      Gets the inner mechanism token wrapped in this SPNEGO token
      Returns:
      the mechanism token bytes
    • setMechanismToken

      public void setMechanismToken(byte[] mechanismToken)
      Sets the inner mechanism token to be wrapped in this SPNEGO token
      Parameters:
      mechanismToken - the mechanism token bytes
    • getMechanismListMIC

      public byte[] getMechanismListMIC()
      Gets the mechanism list MIC (Message Integrity Code) for integrity protection
      Returns:
      the mechanism list MIC bytes
    • setMechanismListMIC

      public void setMechanismListMIC(byte[] mechanismListMIC)
      Sets the mechanism list MIC (Message Integrity Code) for integrity protection
      Parameters:
      mechanismListMIC - the mechanism list MIC bytes
    • toByteArray

      public abstract byte[] toByteArray()
      Encodes this SPNEGO token to a byte array
      Returns:
      the encoded token bytes
    • parse

      protected abstract void parse(byte[] token) throws IOException
      Parses the provided token bytes to populate this SPNEGO token
      Parameters:
      token - the token bytes to parse
      Throws:
      IOException - if parsing fails