Top Description Inners Fields Constructors Methods
sun.security.jgss.spnego

pack-priv abstract Class SpNegoToken

extends GSSToken
Class Inheritance
Known Direct Subclasses
sun.security.jgss.spnego.NegTokenInit, sun.security.jgss.spnego.NegTokenTarg
Imports
org.ietf.jgss.GSSException, sun.security.jgss.GSSToken, sun.security.util.DerOutputStream, .DerValue, .ObjectIdentifier, java.io.IOException

Abstract class for SPNEGO tokens. Implementation is based on RFC 2478 NegotiationToken ::= CHOICE { negTokenInit [0] NegTokenInit, negTokenTarg [1] NegTokenTarg }
Author
Seema Malkani
Since
1.6

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static enum

Field Summary

Modifier and TypeField and Description
pack-priv static final int
pack-priv static final int
public static ObjectIdentifier
OID

The object identifier corresponding to the SPNEGO GSS-API mechanism.

private final int

Constructor Summary

AccessConstructor and Description
protected
SpNegoToken(int tokenType)

Creates SPNEGO token of the specified type.

Method Summary

Modifier and TypeMethod and Description
pack-priv static int

Returns:

the current tag, used as the next value for last
checkNextField
(int
the last tag seen
last
,
int
the current tag
current
)

Checks if the context tag in a sequence is in correct order.

pack-priv abstract byte[]

Returns:

the encoded token
encode
()

Returns the individual encoded SPNEGO token

pack-priv byte[]

Returns:

the encoded token
getEncoded
()

Returns the encoded SPNEGO token Note: inserts the required CHOICE tags

pack-priv static String

Returns:

the String message of this negotiated result
getNegoResultString
(int
the negotiated result
result
)

Returns a string representing the negotiation result.

pack-priv static String

Returns:

the String name of this token type
getTokenName
(int
the token type for which a string name is desired
type
)

Returns a string representing the token type.

pack-priv final int

Returns:

the token type
getType
()

Returns the SPNEGO token type

Inherited from sun.security.jgss.GSSToken:
getHexBytesgetHexBytesgetHexBytesreadBigEndianreadFullyreadFullyreadIntreadIntreadLittleEndianwriteBigEndianwriteBigEndianwriteIntwriteIntwriteLittleEndianwriteLittleEndian

Field Detail

NEG_TOKEN_INIT_IDback to summary
pack-priv static final int NEG_TOKEN_INIT_ID
NEG_TOKEN_TARG_IDback to summary
pack-priv static final int NEG_TOKEN_TARG_ID
OIDback to summary
public static ObjectIdentifier OID

The object identifier corresponding to the SPNEGO GSS-API mechanism.

tokenTypeback to summary
private final int tokenType

Constructor Detail

SpNegoTokenback to summary
protected SpNegoToken(int tokenType)

Creates SPNEGO token of the specified type.

Method Detail

checkNextFieldback to summary
pack-priv static int checkNextField(int last, int current) throws GSSException

Checks if the context tag in a sequence is in correct order. The "last" value must be smaller than "current".

Parameters
last:int

the last tag seen

current:int

the current tag

Returns:int

the current tag, used as the next value for last

Exceptions
GSSException:
if there's a wrong order
encodeback to summary
pack-priv abstract byte[] encode() throws GSSException

Returns the individual encoded SPNEGO token

Returns:byte[]

the encoded token

getEncodedback to summary
pack-priv byte[] getEncoded() throws IOException, GSSException

Returns the encoded SPNEGO token Note: inserts the required CHOICE tags

Returns:byte[]

the encoded token

getNegoResultStringback to summary
pack-priv static String getNegoResultString(int result)

Returns a string representing the negotiation result.

Parameters
result:int

the negotiated result

Returns:String

the String message of this negotiated result

getTokenNameback to summary
pack-priv static String getTokenName(int type)

Returns a string representing the token type.

Parameters
type:int

the token type for which a string name is desired

Returns:String

the String name of this token type

getTypeback to summary
pack-priv final int getType()

Returns the SPNEGO token type

Returns:int

the token type

sun.security.jgss.spnego back to summary

pack-priv final Enum SpNegoToken.NegoResult

extends Enum<SpNegoToken.NegoResult>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final SpNegoToken.NegoResult
public static final SpNegoToken.NegoResult
public static final SpNegoToken.NegoResult

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static SpNegoToken.NegoResult
public static SpNegoToken.NegoResult[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

ACCEPT_COMPLETEback to summary
public static final SpNegoToken.NegoResult ACCEPT_COMPLETE
ACCEPT_INCOMPLETEback to summary
public static final SpNegoToken.NegoResult ACCEPT_INCOMPLETE
REJECTback to summary
public static final SpNegoToken.NegoResult REJECT

Constructor Detail

NegoResultback to summary
private NegoResult()

Method Detail

valueOfback to summary
public static SpNegoToken.NegoResult valueOf(String name)
valuesback to summary
public static SpNegoToken.NegoResult[] values()