public abstract class RadiusClientTransport extends Object
| Modifier and Type | Field and Description |
|---|---|
protected int |
acctPort |
protected int |
authPort |
static int |
defaultTimeout |
protected InetAddress |
localInetAddress |
protected RadiusClient |
radiusClient |
protected InetAddress |
remoteInetAddress |
protected String |
sharedSecret |
protected int |
socketTimeout |
protected TransportStatusListener |
statusListener |
| Constructor and Description |
|---|
RadiusClientTransport() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
close() |
protected void |
generateMessageAuthenticator(RadiusPacket request)
Add the Message-Authentivator attribute to the given RadiusPacket
|
int |
getAcctPort() |
int |
getAuthPort() |
InetAddress |
getLocalInetAddress() |
RadiusClient |
getRadiusClient() |
InetAddress |
getRemoteInetAddress() |
String |
getSharedSecret() |
int |
getSocketTimeout() |
protected abstract RadiusResponse |
receive(RadiusRequest req) |
protected abstract void |
send(RadiusRequest req,
int attempt) |
RadiusResponse |
sendReceive(RadiusRequest p,
int retries)
Send and receive RadiusPackets
|
void |
setAcctPort(int acctPort) |
void |
setAuthPort(int authPort) |
void |
setLocalInetAddress(InetAddress localInetAddress) |
void |
setRadiusClient(RadiusClient radiusClient) |
void |
setRemoteInetAddress(InetAddress remoteInetAddress) |
void |
setSharedSecret(String sharedSecret) |
void |
setSocketTimeout(int socketTimeout) |
void |
setStatusListener(TransportStatusListener statusListener) |
static boolean |
verifyAuthenticator(byte[] requestAuth,
RadiusResponse reply,
String sharedSecret) |
boolean |
verifyAuthenticator(RadiusRequest request,
RadiusResponse reply)
Verify the RADIUS Authenticator
|
static boolean |
verifyAuthenticator(RadiusRequest request,
RadiusResponse reply,
String sharedSecret) |
static boolean |
verifyMessageAuthenticator(byte[] requestAuth,
RadiusResponse reply,
String sharedSecret,
boolean required) |
boolean |
verifyMessageAuthenticator(RadiusRequest request,
RadiusResponse reply,
boolean required)
Verify the Message-Authenticator based on RFC 2869
|
static boolean |
verifyMessageAuthenticator(RadiusRequest request,
RadiusResponse reply,
String sharedSecret,
boolean required) |
protected InetAddress localInetAddress
protected InetAddress remoteInetAddress
protected String sharedSecret
protected int authPort
protected int acctPort
public static final int defaultTimeout
protected int socketTimeout
protected RadiusClient radiusClient
protected TransportStatusListener statusListener
protected abstract void send(RadiusRequest req, int attempt) throws Exception
Exceptionprotected abstract RadiusResponse receive(RadiusRequest req) throws Exception
Exceptionpublic abstract void close()
public RadiusResponse sendReceive(RadiusRequest p, int retries) throws RadiusException
p - The RadiusPacket being senta - The Internet Address sending toport - The port sending toretries - Number of times to retry (without response)RadiusExceptionprotected void generateMessageAuthenticator(RadiusPacket request) throws IOException, InvalidKeyException, NoSuchAlgorithmException
request - The RadiusPacketNoSuchAlgorithmExceptionInvalidKeyExceptionIOExceptionpublic boolean verifyMessageAuthenticator(RadiusRequest request, RadiusResponse reply, boolean required)
request - The RADIUS request sendreply - The RADIUS reply receivedrequired - Whether or not the Message-Authenticator is required (as for EAP)public static boolean verifyMessageAuthenticator(RadiusRequest request, RadiusResponse reply, String sharedSecret, boolean required)
public static boolean verifyMessageAuthenticator(byte[] requestAuth,
RadiusResponse reply,
String sharedSecret,
boolean required)
public boolean verifyAuthenticator(RadiusRequest request, RadiusResponse reply)
request - The RADIUS request sendreply - The RADIUS reply receivedpublic static boolean verifyAuthenticator(RadiusRequest request, RadiusResponse reply, String sharedSecret)
public static boolean verifyAuthenticator(byte[] requestAuth,
RadiusResponse reply,
String sharedSecret)
public InetAddress getRemoteInetAddress()
public void setRemoteInetAddress(InetAddress remoteInetAddress)
public InetAddress getLocalInetAddress()
public void setLocalInetAddress(InetAddress localInetAddress)
public String getSharedSecret()
public void setSharedSecret(String sharedSecret)
public int getAuthPort()
public void setAuthPort(int authPort)
public int getAcctPort()
public void setAcctPort(int acctPort)
public int getSocketTimeout()
public void setSocketTimeout(int socketTimeout)
socketTimeout - The socket timeout (in seconds)public RadiusClient getRadiusClient()
public void setRadiusClient(RadiusClient radiusClient)
public void setStatusListener(TransportStatusListener statusListener)
Copyright © 2017. All rights reserved.