public class AccessRequest extends RadiusPacket
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
AUTH_CHAP
Challenged Handshake Authentication Protocol
|
static String |
AUTH_PAP
Passphrase Authentication Protocol
|
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| 构造器和说明 |
|---|
AccessRequest()
Constructs an empty Access-Request packet.
|
AccessRequest(String userName,
String userPassword)
Constructs an Access-Request packet, sets the
code, identifier and adds an User-Name and an
User-Password attribute (PAP).
|
| 限定符和类型 | 方法和说明 |
|---|---|
protected void |
decodeRequestAttributes(String sharedSecret)
Decrypts the User-Password attribute.
|
protected void |
encodeRequestAttributes(String sharedSecret)
Sets and encrypts the User-Password attribute.
|
String |
getAuthProtocol()
Returns the protocol used for encrypting the passphrase.
|
String |
getUserName()
Retrieves the user name from the User-Name attribute.
|
String |
getUserPassword()
Retrieves the plain-text user password.
|
void |
setAuthProtocol(String authProtocol)
Selects the protocol to use for encrypting the passphrase when
encoding this Radius packet.
|
void |
setUserName(String userName)
Sets the User-Name attribute of this Access-Request.
|
void |
setUserPassword(String userPassword)
Sets the plain-text user password.
|
boolean |
verifyPassword(String plaintext)
Verifies that the passed plain-text password matches the password
(hash) send with this Access-Request packet.
|
addAttribute, addAttribute, checkRequestAuthenticator, checkResponseAuthenticator, createRadiusPacket, createRequestAuthenticator, createResponseAuthenticator, decodePacket, decodeRequestPacket, decodeRequestPacket, decodeResponsePacket, decodeResponsePacket, encodePacket, encodeRequestPacket, encodeResponsePacket, getAttribute, getAttribute, getAttribute, getAttributeBytes, getAttributes, getAttributes, getAttributes, getAttributeValue, getAuthenticator, getDictionary, getMd5Digest, getNextPacketIdentifier, getPacketIdentifier, getPacketType, getPacketTypeName, getVendorAttribute, getVendorAttributes, removeAttribute, removeAttributes, removeAttributes, removeLastAttribute, setAttributes, setAuthenticator, setDictionary, setPacketIdentifier, setPacketType, toString, updateRequestAuthenticatorpublic void setUserName(String userName)
userName - user name to setpublic void setUserPassword(String userPassword)
userPassword - user password to setpublic String getUserPassword()
verifyPassword(String)public String getUserName()
public String getAuthProtocol()
public void setAuthProtocol(String authProtocol)
authProtocol - AUTH_PAP or AUTH_CHAPpublic boolean verifyPassword(String plaintext) throws RadiusException
plaintext - RadiusExceptionprotected void decodeRequestAttributes(String sharedSecret) throws RadiusException
protected void encodeRequestAttributes(String sharedSecret)
Copyright © 2016. All rights reserved.