Package net.jradius.client

Examples of net.jradius.client.RadiusClient


        this.inetAddress = InetAddress.getByName(hostName);
    }

    public boolean authenticate(
        final UsernamePasswordCredentials usernamePasswordCredentials) {
        final RadiusClient radiusClient = getNewRadiusClient();

        final AttributeList attributeList = new AttributeList();
        attributeList.add(new Attr_UserName(usernamePasswordCredentials
            .getUsername()));
        attributeList.add(new Attr_UserPassword(usernamePasswordCredentials
            .getPassword()));

        final AccessRequest request = new AccessRequest(radiusClient,
            attributeList);

        try {
            final RadiusPacket response = radiusClient.authenticate(request,
                this.radiusAuthenticator, this.retries);

            // accepted
            if (response instanceof AccessAccept) {
                LOG.debug("Authentication request suceeded for host:"
View Full Code Here


                    + e.getMessage());
        }
    }

    private RadiusClient getNewRadiusClient() {
        return new RadiusClient(this.inetAddress, this.sharedSecret,
            this.authenticationPort, this.accountingPort, this.socketTimeout);
    }
View Full Code Here

TOP

Related Classes of net.jradius.client.RadiusClient

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.