|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.gssapi.GSSName
public class GSSName
An object of this class encapsulates a single GSS-API principal entity. Different name formats and their definitions are identified with universal Object Identifiers (Oids). The format of the names can be derived based on the unique oid of each name type.
JGSS distinguishes between the following name representations:
Oid
Field Summary | |
---|---|
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 Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
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) }
Constructor Detail |
---|
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 type
GSSException
- 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 for
GSSException
- 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 for
GSSException
- with possible major codes of
BAD_NAMETYPE, BAD_NAME, or FAILURE.GSSName(String,Oid)
,
GSSName#GSSName(name,Oid)
,
export()
Method Detail |
---|
public boolean equals(java.lang.Object another)
equals
in class java.lang.Object
another
- the GSSName object to be compared
public boolean equals(GSSName another) throws GSSException
another
- GSSName object to be compared
GSSException
- 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
canonicalized
GSSException
- 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.Object
getStringNameType()
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.Object
java.lang.CloneNotSupportedException
- may be thrownpublic boolean isAnonymousName()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |