public class

Krb5NameElement

extends Object
implements GSSNameSpi
java.lang.Object
   ↳ sun.security.mule.jgss.krb5.Krb5NameElement

Class Overview

Implements the GSSNameSpi for the krb5 mechanism.

Summary

Fields
private static String CHAR_ENCODING
private String gssNameStr
private Oid gssNameType
private PrincipalName krb5PrincipalName
Public Methods
boolean equals(Object another)
Compares this GSSNameSpi object to another Object that might be a GSSNameSpi.
boolean equals(GSSNameSpi other)
Equal method for the GSSNameSpi objects.
byte[] export()
Returns the principal name in the form user@REALM or host/service@REALM but with the following contraints that are imposed by RFC 1964:
  (1) all occurrences of the characters `@`,  `/`, and `\` within
   principal components or realm names shall be quoted with an
   immediately-preceding `\`.
Oid getGSSNameType()
Returns the name type oid.
static Krb5NameElement getInstance(String gssNameStr, Oid gssNameType, Config kerberosConfig)
Instantiates a new Krb5NameElement object.
static Krb5NameElement getInstance(PrincipalName principalName)
final PrincipalName getKrb5PrincipalName()
Oid getMechanism()
Get the mechanism type that this NameElement corresponds to.
Provider getProvider()
Oid getStringNameType()
Returns the oid describing the format of the printable name.
int hashCode()
Returns a hashcode value for this GSSNameSpi.
boolean isAnonymousName()
Indicates if this name object represents an Anonymous name.
String toString()
Returns a string representation for this name.
[Expand]
Inherited Methods
From class java.lang.Object
From interface sun.security.mule.jgss.spi.GSSNameSpi

Fields

private static String CHAR_ENCODING

private String gssNameStr

private Oid gssNameType

private PrincipalName krb5PrincipalName

Public Methods

public boolean equals (Object another)

Compares this GSSNameSpi object to another Object that might be a GSSNameSpi. The behaviour is exactly the same as in equals except that no GSSException is thrown; instead, false will be returned in the situation where an error occurs.

Parameters
another The object to be compared to

public boolean equals (GSSNameSpi other)

Equal method for the GSSNameSpi objects. If either name denotes an anonymous principal, the call should return false.

Parameters
other To be compared with
Throws
GSSException with major codes of BAD_NAMETYPE, BAD_NAME, FAILURE

public byte[] export ()

Returns the principal name in the form user@REALM or host/service@REALM but with the following contraints that are imposed by RFC 1964:

  (1) all occurrences of the characters `@`,  `/`, and `\` within
   principal components or realm names shall be quoted with an
   immediately-preceding `\`.
 
   (2) all occurrences of the null, backspace, tab, or newline
   characters within principal components or realm names will be
   represented, respectively, with `\0`, `\b`, `\t`, or `\n`.
 
   (3) the `\` quoting character shall not be emitted within an
   exported name except to accomodate cases (1) and (2).
 

Returns
  • the flat name representation for this object
Throws
GSSException

public Oid getGSSNameType ()

Returns the name type oid.

public static Krb5NameElement getInstance (String gssNameStr, Oid gssNameType, Config kerberosConfig)

Instantiates a new Krb5NameElement object. Internally it stores the information provided by the input parameters so that they may later be used for output when a printable representaion of this name is needed in GSS-API format rather than in Kerberos format.

Parameters
gssNameStr
gssNameType
kerberosConfig
Throws
GSSException

public static Krb5NameElement getInstance (PrincipalName principalName)

Parameters
principalName

public final PrincipalName getKrb5PrincipalName ()

public Oid getMechanism ()

Get the mechanism type that this NameElement corresponds to.

Returns
  • the Oid of the mechanism type

public Provider getProvider ()

public Oid getStringNameType ()

Returns the oid describing the format of the printable name.

Returns
  • the Oid for the format of the printed name

public int hashCode ()

Returns a hashcode value for this GSSNameSpi.

Returns
  • a hashCode value

public boolean isAnonymousName ()

Indicates if this name object represents an Anonymous name.

public String toString ()

Returns a string representation for this name. The printed name type can be obtained by calling getStringNameType().

Returns
  • string form of this name