com.dstc.security.kerberos.msg
Interface KrbError


public interface KrbError
extends KerberosMessage

An interface to the Kerberos error message.

Defined in RFC 1510 by the ASN.1 structure KRB-ERROR

 KRB-ERROR ::=   [APPLICATION 30] SEQUENCE {
                   pvno[0]               INTEGER,
                   msg-type[1]           INTEGER,
                   ctime[2]              KerberosTime OPTIONAL,
                   cusec[3]              INTEGER OPTIONAL,
                   stime[4]              KerberosTime,
                   susec[5]              INTEGER,
                   error-code[6]         INTEGER,
                   crealm[7]             Realm OPTIONAL,
                   cname[8]              PrincipalName OPTIONAL,
                   realm[9]              Realm, -- Correct realm
                   sname[10]             PrincipalName, -- Correct name
                   e-text[11]            GeneralString OPTIONAL,
                   e-data[12]            OCTET STRING OPTIONAL
                 }
 


Method Summary
 PrincipalName getClientName()
          Returns the client PrincipalName in this message, or null if absent
 String getClientRealm()
          Returns the client realm in this message, or null if absent
 Date getClientTime()
          Returns the client time in this message, or null if absent.
 int getErrorCode()
          Returns the error code in this message
 byte[] getErrorData()
          Returns the error data in this message, or null if absent
 String getMessage()
          Returns a string representation of the error, or null if absent
 String getRealm()
          Returns the realm in this message, or null if absent
 PrincipalName getServerName()
          Returns the server PrincipalName in this message
 Date getServerTime()
          Returns the server time in this message.
 
Methods inherited from interface com.dstc.security.kerberos.msg.KerberosMessage
getEncoded
 

Method Detail

getClientTime

public Date getClientTime()
Returns the client time in this message, or null if absent. The returned time is a combination of the ctime and cusec fields in the ASN.1 definition of KRB-ERROR, correct to the resolution of a Java Date (ie. fractional milliseconds are ignored).

getServerTime

public Date getServerTime()
Returns the server time in this message. The returned time is a combination of the stime and susec fields in the ASN.1 definition of KRB-ERROR, correct to the resolution of a Java Date (ie. fractional milliseconds are ignored).

getErrorCode

public int getErrorCode()
Returns the error code in this message

getClientRealm

public String getClientRealm()
Returns the client realm in this message, or null if absent

getClientName

public PrincipalName getClientName()
Returns the client PrincipalName in this message, or null if absent

getRealm

public String getRealm()
Returns the realm in this message, or null if absent

getServerName

public PrincipalName getServerName()
Returns the server PrincipalName in this message

getMessage

public String getMessage()
Returns a string representation of the error, or null if absent

getErrorData

public byte[] getErrorData()
Returns the error data in this message, or null if absent