public class RadiusConn extends Object
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_TIMEOUT
The default timeout.
|
Constructor and Description |
---|
RadiusConn(Set<RADIUSServer> primaries,
Set<RADIUSServer> secondaries,
String secret,
int timeout,
byte[] seed,
int healthCheckInterval)
Construct a connection object primary and secondary servers and seed for generating a
SecureRandom . |
RadiusConn(Set<RADIUSServer> primaries,
Set<RADIUSServer> secondaries,
String secret,
int timeout,
int healthCheckInterval)
Construct a connection object with a set of primary and seconary servers.
|
RadiusConn(Set<RADIUSServer> primaries,
String secret,
byte[] seed,
int healthCheckInterval)
Constructs a connection object with only a set of primary servers.
|
Modifier and Type | Method and Description |
---|---|
Packet |
authenticate(String name,
String password)
Authenticates the username and password against the remote servers.
|
void |
disconnect()
Disconnects the underlying datagram socket.
|
Packet |
replyChallenge(String name,
String password,
ChallengeException ce)
Sends an access-request to the server in response to a challenge request.
|
public static final int DEFAULT_TIMEOUT
public RadiusConn(Set<RADIUSServer> primaries, Set<RADIUSServer> secondaries, String secret, int timeout, int healthCheckInterval) throws SocketException
primaries
- the primary servers to connect to.secondaries
- the secondary servers to connect to.secret
- the secret shared between this client and the remote servers.timeout
- the timeout value.healthCheckInterval
- the health check interval.SocketException
- thrown if unable to create a DatagramSocket.public RadiusConn(Set<RADIUSServer> primaries, String secret, byte[] seed, int healthCheckInterval) throws SocketException
primaries
- the primary servers to connect to.secret
- the secret shared between this client and the remote servers.seed
- the seed value to be used to create a SecureRandom
instance.healthCheckInterval
- the health check interval.SocketException
- thrown if unable to create a DatagramSocket.public RadiusConn(Set<RADIUSServer> primaries, Set<RADIUSServer> secondaries, String secret, int timeout, byte[] seed, int healthCheckInterval) throws SocketException
SecureRandom
.primaries
- the primary servers to connect to.secondaries
- the secondary servers to connect to.secret
- the secret shared between this client and the remote servers.timeout
- the timeout value.seed
- the seed value to be used to create a SecureRandom
instance.healthCheckInterval
- the health check interval.SocketException
- if a socket exception occurs.public void disconnect() throws IOException
IOException
- if an io exception occurs.public Packet authenticate(String name, String password) throws IOException, NoSuchAlgorithmException, RejectException, ChallengeException
name
- the username.password
- the password.IOException
- if there is a problem.NoSuchAlgorithmException
- if there is a problem.RejectException
- if there is a problem.ChallengeException
- if there is a problem.public Packet replyChallenge(String name, String password, ChallengeException ce) throws IOException, NoSuchAlgorithmException, RejectException, ChallengeException
name
- the username.password
- the password.ce
- the challenge exception providing access to the original challenge response.IOException
- if there is a problem.NoSuchAlgorithmException
- if there is a problem.RejectException
- if there is a problem.ChallengeException
- if there is a problem.Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.