public class GSSName
extends java.lang.Object
JGSS distinguishes between the following name representations:
Oid| Modifier and Type | Field and Description |
|---|---|
static Oid |
NT_ANONYMOUS
Name type used to represent an Anonymous identity.
|
static Oid |
NT_EXPORT_NAME
Name type used to indicate an exported name produced by the
export method.
|
static Oid |
NT_HOSTBASED_SERVICE
Name type used to indicate a host-based service name form.
|
static Oid |
NT_MACHINE_UID_NAME
Name type used to indicate a numeric user identifier corresponding
to a user on a local system.
|
static Oid |
NT_STRING_UID_NAME
Name type used to indicate a string of digits representing the
numeric user identifier of a user on a local system.
|
static Oid |
NT_USER_NAME
Name type used to indicate a named user on a local system.
|
| Constructor and Description |
|---|
GSSName(byte[] name,
Oid type)
Creates a new GSSName object from the specified type.
|
GSSName(byte[] name,
Oid nameType,
Oid mechType)
Creates a new GSSName object from the specified type.
|
GSSName(java.lang.String nameStr,
Oid type)
Converts a contiguous string name to a GSSName object
of the specified type.
|
GSSName(java.lang.String nameStr,
Oid nameType,
Oid mechType)
Creates a new GSSName object of the specified type.
|
| Modifier and Type | Method and Description |
|---|---|
GSSName |
canonicalize(Oid mechOid)
Creates a new name which is guaranteed to be mechanism specific (MN).
|
java.lang.Object |
clone()
Creates a duplicate of this object.
|
boolean |
equals(GSSName another)
A variation of equals method which may throw a GSSException
when the names cannot be compared.
|
boolean |
equals(java.lang.Object another)
Compares this name with the specified GSSName for equality.
|
byte[] |
export()
Returns a flat name representation for this GSSName object.
|
Oid |
getStringNameType()
Returns the name type for the printed name.
|
boolean |
isAnonymousName()
Tests if this is an Anonymous name object.
|
java.lang.String |
toString()
Returns a string representation of the GSSName object.
|
public static final Oid NT_HOSTBASED_SERVICE
{ 1(iso), 3(org), 6(dod), 1(internet), 5(security), 6(nametypes), 2(gss-host-based-services) }
public static final Oid NT_USER_NAME
{ iso(1) member-body(2) United States(840) mit(113554) infosys(1) gssapi(2) generic(1) user_name(1) }
public static final Oid NT_MACHINE_UID_NAME
{ iso(1) member-body(2) United States(840) mit(113554) infosys(1) gssapi(2) generic(1) machine_uid_name(2) }
public static final Oid NT_STRING_UID_NAME
{ iso(1) member-body(2) United States(840) mit(113554) infosys(1) gssapi(2) generic(1) string_uid_name(3) }
public static final Oid NT_ANONYMOUS
{ 1(iso), 3(org), 6(dod), 1(internet), 5(security), 6(nametypes), 3(gss-anonymous-name) }
public static final Oid NT_EXPORT_NAME
{ 1(iso), 3(org), 6(dod), 1(internet), 5(security), 6(nametypes), 4(gss-api-exported-name) }
public GSSName(java.lang.String nameStr,
Oid type)
nameStr - the name to createtype - an oid specifying the name typepublic GSSName(byte[] name,
Oid type)
throws GSSException
name - buffer containing nametype - an Oid specifying the name typeGSSException - with possible major codes of
BAD_NAMETYPE, BAD_NAME, or FAILURE.GSSName(String,Oid),
GSSName(byte[],Oid,Oid),
export()public GSSName(java.lang.String nameStr,
Oid nameType,
Oid mechType)
throws GSSException
nameStr - the name to createnameType - an oid specifying the name typemechType - the oid of the mechanism to create this name forGSSException - with possible major codes of
BAD_NAMETYPE, BAD_NAME, or FAILURE.GSSName(String,Oid)public GSSName(byte[] name,
Oid nameType,
Oid mechType)
throws GSSException
name - buffer containing namenameType - an Oid specifying the name typemechType - an Oid for the mechanism to create this name forGSSException - with possible major codes of
BAD_NAMETYPE, BAD_NAME, or FAILURE.GSSName(String,Oid),
GSSName#GSSName(name,Oid),
export()public boolean equals(java.lang.Object another)
equals in class java.lang.Objectanother - the GSSName object to be comparedpublic boolean equals(GSSName another) throws GSSException
another - GSSName object to be comparedGSSException - with possible major codes of
BAD_NAMETYPE, BAD_NAME, FAILUREpublic GSSName canonicalize(Oid mechOid) throws GSSException
mechOid - oid of the mechanism for which the name should be
canonicalizedGSSException - with possible major codes of
BAD_MECH, BAD_NAMETYPE.public byte[] export()
throws GSSException
GSSException - with possible major codes of NAME_NOT_MN,
BAD_NAME, BAD_NAMETYPE, FAILURE.canonicalize(com.sun.gssapi.Oid)public java.lang.String toString()
toString in class java.lang.ObjectgetStringNameType()public Oid getStringNameType() throws GSSException
GSSException - when the name can't be printedtoString()public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedException - may be thrownpublic boolean isAnonymousName()