use of net.jradius.radsec.RadSecClientTransport in project cas by apereo.
the class RadiusClientFactory method newInstance.
/**
* New instance radius client.
* Attempts to pre-load authenticators
* that are defined statically before
* returning the client.
*
* @return the radius client
*/
@SneakyThrows
public RadiusClient newInstance() {
if (sslContext != null && this.transportType == RadiusClientProperties.RadiusClientTransportTypes.RADSEC) {
val transport = new RadSecClientTransport(sslContext.getKeyManagers(), sslContext.getTrustManagers());
transport.setRemoteInetAddress(InetAddress.getByName(this.inetAddress));
transport.setSharedSecret(sharedSecret);
transport.setAuthPort(this.authenticationPort);
transport.setAcctPort(this.accountingPort);
transport.setSocketTimeout(this.socketTimeout);
return new RadiusClient(transport);
}
return new RadiusClient(InetAddress.getByName(this.inetAddress), this.sharedSecret, this.authenticationPort, this.accountingPort, this.socketTimeout);
}
Aggregations