|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.tinyradius.packet.RadiusPacket
org.tinyradius.packet.AccessRequest
public class AccessRequest
This class represents an Access-Request Radius packet.
Field Summary | |
---|---|
static java.lang.String |
AUTH_CHAP
Challenged Handshake Authentication Protocol |
static java.lang.String |
AUTH_PAP
Passphrase Authentication Protocol |
Fields inherited from class org.tinyradius.packet.RadiusPacket |
---|
ACCESS_ACCEPT, ACCESS_CHALLENGE, ACCESS_REJECT, ACCESS_REQUEST, ACCOUNTING_MESSAGE, ACCOUNTING_REQUEST, ACCOUNTING_RESPONSE, ACCOUNTING_STATUS, COA_ACK, COA_NAK, COA_REQUEST, DISCONNECT_ACK, DISCONNECT_NAK, DISCONNECT_REQUEST, MAX_PACKET_LENGTH, PASSWORD_ACCEPT, PASSWORD_REJECT, PASSWORD_REQUEST, RADIUS_HEADER_LENGTH, RESERVED, STATUS_ACCEPT, STATUS_CLIENT, STATUS_REJECT, STATUS_REQUEST, STATUS_SERVER |
Constructor Summary | |
---|---|
AccessRequest()
Constructs an empty Access-Request packet. |
|
AccessRequest(java.lang.String userName,
java.lang.String userPassword)
Constructs an Access-Request packet, sets the code, identifier and adds an User-Name and an User-Password attribute (PAP). |
Method Summary | |
---|---|
protected void |
decodeRequestAttributes(java.lang.String sharedSecret)
Decrypts the User-Password attribute. |
protected void |
encodeRequestAttributes(java.lang.String sharedSecret)
Sets and encrypts the User-Password attribute. |
java.lang.String |
getAuthProtocol()
Returns the protocol used for encrypting the passphrase. |
java.lang.String |
getUserName()
Retrieves the user name from the User-Name attribute. |
java.lang.String |
getUserPassword()
Retrieves the plain-text user password. |
void |
setAuthProtocol(java.lang.String authProtocol)
Selects the protocol to use for encrypting the passphrase when encoding this Radius packet. |
void |
setUserName(java.lang.String userName)
Sets the User-Name attribute of this Access-Request. |
void |
setUserPassword(java.lang.String userPassword)
Sets the plain-text user password. |
boolean |
verifyPassword(java.lang.String plaintext)
Verifies that the passed plain-text password matches the password (hash) send with this Access-Request packet. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String AUTH_PAP
public static final java.lang.String AUTH_CHAP
Constructor Detail |
---|
public AccessRequest()
public AccessRequest(java.lang.String userName, java.lang.String userPassword)
userName
- user nameuserPassword
- user passwordMethod Detail |
---|
public void setUserName(java.lang.String userName)
userName
- user name to setpublic void setUserPassword(java.lang.String userPassword)
userPassword
- user password to setpublic java.lang.String getUserPassword()
verifyPassword(String)
public java.lang.String getUserName()
public java.lang.String getAuthProtocol()
public void setAuthProtocol(java.lang.String authProtocol)
authProtocol
- AUTH_PAP or AUTH_CHAPpublic boolean verifyPassword(java.lang.String plaintext) throws RadiusException
plaintext
-
RadiusException
protected void decodeRequestAttributes(java.lang.String sharedSecret) throws RadiusException
decodeRequestAttributes
in class RadiusPacket
RadiusException
RadiusPacket.decodeRequestAttributes(java.lang.String)
protected void encodeRequestAttributes(java.lang.String sharedSecret)
encodeRequestAttributes
in class RadiusPacket
RadiusPacket.encodeRequestAttributes(java.lang.String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |