|
AXL Software® | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectPacket
AuthenticationPacket
Class providing the reply to an Authentication request. This class holds the information provided by an Authentication reply packet.
TACACSClient,
TACACSCallback| Field Summary | |
static int |
CHALLENGE_LENGTH
Challenge length Response lengh |
static int |
FLAGS_LENGTH
Flags length. |
static int |
NTRESPONSE_LENGTH
NT-Response length. |
static int |
RESERVED_LENGTH
Reserved length. |
static int |
RESPONSE_LENGTH
Total Response length. |
| Constructor Summary | |
AuthenticationPacket()
Default Constructor. |
|
| Method Summary | |
byte[] |
createARAP(byte[] password)
Create an ARAP challenges & response. |
static byte[] |
createChap(String password)
Create Chap data field. |
byte[] |
createMSCHAP(byte[] password)
Create an MS-CHAP password from a non-plain text (or plain text) password. |
byte[] |
getARAPChallenge()
Get the ARAP response challenge. |
byte[] |
getData()
Get the authentication reply data field contents. |
int |
getFlags()
Get the flags from a reply packet. |
PacketHeader |
getPacketHeader()
Get the packet header. |
String |
getServerMessage()
Get the server message from an Auththentication reply |
int |
getStatus()
Get the status flag. |
String |
getStatusName(int status)
Get the authentication status name for the value. |
String |
getUserMessage()
Get the user message from a Authentication Continue reply suitable for displaying. |
void |
setData(byte[] data)
Set the data field contents. |
void |
setUserMessage(byte[] userMessage)
Set the user message in response to a server message. |
boolean |
verifyARAP(byte[] password,
byte[] respChallenge)
Verify the ARAP information returned from the server |
| Methods inherited from class Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int CHALLENGE_LENGTH
public static final int RESERVED_LENGTH
public static final int NTRESPONSE_LENGTH
public static final int FLAGS_LENGTH
public static final int RESPONSE_LENGTH
| Constructor Detail |
public AuthenticationPacket()
| Method Detail |
public String getStatusName(int status)
status - Status value.
public String getServerMessage()
public String getUserMessage()
public byte[] getData()
public int getStatus()
This is one of
TAC.TAC_PLUS_AUTHEN_STATUS_PASS,
TAC.TAC_PLUS_AUTHEN_STATUS_FAIL,
TAC.TAC_PLUS_AUTHEN_STATUS_GETDATA
TAC.TAC_PLUS_AUTHEN_STATUS_GETUSER
TAC.TAC_PLUS_AUTHEN_STATUS_GETPASS
The first two refer to all authentication types. The last three are used when the client does not pass the name or password (or other data) in the authentication packet. The server will prompt for the name and password and other data as required for the authentication method using CONTINUE packets.
public PacketHeader getPacketHeader()
public void setUserMessage(byte[] userMessage)
userMessage - User message.public void setData(byte[] data)
data - Data.public int getFlags()
public static byte[] createChap(String password)
password - Password.
public byte[] createMSCHAP(byte[] password)
throws TACACSException
password - Plain text password to encode. It must not be
in encoded in UNICODE format. The default UTF8 encoding is sufficient.
TACACSException - if there's a problem instantiating the DES cipher.
public byte[] createARAP(byte[] password)
throws TACACSException
password - Plain text password to encode.
TACACSException - if there's a problem with DES encoding.public byte[] getARAPChallenge()
This information should be saved after createARAP() method has been
used. The challenge value is used to verify data in the reply packet using
verifyARAP().
public boolean verifyARAP(byte[] password,
byte[] respChallenge)
throws TACACSException
password - Plain text password.respChallenge - Response challenge from the reply packet data.
TACACSException - if there's a problem with the DES cipher.
|
AXL Software® | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||