Skip to content

Latest commit

 

History

History
49 lines (31 loc) · 1.27 KB

README.md

File metadata and controls

49 lines (31 loc) · 1.27 KB

goradius

Build Status GoDoc

Description

goradius package implements basic Radius client capabilities, allowing Go code to authenticate against a Radius server. It is based on https://github.com/btimby/py-radius python package

Installation

To install this package simply:

go get github.com/kirves/goradius

Test

Before testing goradius fill the necessary data in the goradius_test.go file (server url, secret, username and password to test the client).

After that, simply run:

go test github.com/kirves/goradius

Example

To authenticate a user simply create a new AuthenticatorT object using server information and the secret associated to your client

auth := goradius.Authenticator(server_url, server_port, secret)

And try to authenticate a user:

ok, err := auth.Authenticate(username, password, nasId)
if err != nil {
	panic(err)
}
if ok {
	// user successfully authenticated
}

License

goradius is released under the MIT license. See LICENSE.